joseluisq / gitnow

Speed up your Git workflow. :tropical_fish:
https://github.com/joseluisq/gitnow
MIT License
391 stars 25 forks source link

Fix invalid argument error when __gitnow_check_if_branch_exist is used for Fish test checks #28

Closed joseluisq closed 3 years ago

joseluisq commented 3 years ago

This PR fixes an issue when the __gitnow_check_if_branch_exist function is used along with the Fish test on if conditionals. This was occurring because the return type of the function was not consistent.

Here an example of the incoming merge command which uses __gitnow_check_if_branch_exist function.

~> merge --continue
# Invalid argument: 'Provide a valid branch name.'
# ~/.config/fish/conf.d/gitnow.fish (line 282):
#    if test $v_found -eq 0
#       ^
# in function 'merge' with arguments '--continue'
# Already up to date.
joseluisq commented 3 years ago

FYI: This PR fixes also the issue on the incoming merge command. PR https://github.com/joseluisq/gitnow/pull/27.