Bhupesh-V / ugit

🚨️ ugit helps undo git commands. Your damage control git buddy. Undo from 20+ git scenarios.
https://bhupesh.me/undo-your-last-git-mistake-with-ugit/
MIT License
1.41k stars 45 forks source link

Provide bug report URL every time an error occurs with ugit #39

Closed Bhupesh-V closed 2 years ago

Bhupesh-V commented 2 years ago

The goal is to catch any command that exists with an exit code of 1. And display a prompt or URL to ugit's issues so that users can report the problem.

kopalchakravarty commented 2 years ago

@Bhupesh-V I'd like to work on this issue please

kopalchakravarty commented 2 years ago

@Bhupesh-V can you help me with a scenario where returning exit code 1 is different than calling the perror function please? I'm unclear about the scope of this ticket, because for every command that we execute, we're already calling the perror function if the execution fails. When we write Java code for instance, we handle known exceptions and define a default exception block in case the none of the ones defined by us match the definitions. What exactly do we mean when we say a command exits with exit code 1, and aren't we already doing that by calling the perror function?

Bhupesh-V commented 2 years ago

@Bhupesh-V can you help me with a scenario where returning exit code 1 is different than calling the perror function please? I'm unclear about the scope of this ticket, because for every command that we execute, we're already calling the perror function if the execution fails. When we write Java code for instance, we handle known exceptions and define a default exception block in case the none of the ones defined by us match the definitions. What exactly do we mean when we say a command exits with exit code 1, and aren't we already doing that by calling the perror function?

I guess you explained it correctly, the ticket was intended to have an open brainstorming invlolved. Agreed, that perror is already handling the case when something goes sideways.