Closed sandr01d closed 11 months ago
I agree with you, I prefer to have the error message. Also there are a few functions were we already do return in case of an error, so refactoring this would make things more consistent.
There is an exception to this: In gbl
we actually make use of this behavior. We do not return in case git blame
returned an error, but use the parameters later on. This allows things like gbl --color-by-age
. I do something similar in #317. In those cases we could just check whether all passed arguments are flags and only invoke the git command without fzf if there were non-flag parameters passed.
I can update #317 accordingly. Would you prefer to have a separate PR for the refactoring or have this included in this one?
@sandr01d That sounds totally reasonable and I like the idea of checking for flags. IMO you can merge #317 directly and then do a follow up PR to do the refactoring. Thanks for your work on this!
Closing in favor of #318
Check list
Description
Passing invalid arguments to
_forgit_stash_push
results in an infinite loop printing gits error message. You can test this by runninggsp -b
. With this PR we only print the error message once and return gits exit code.Type of change
Test environment