jhillyerd / plugin-git

Git aliases plugin for the Fish shell (similar to oh-my-zsh git)
MIT License
607 stars 85 forks source link

__git.current_branch returns branch name and branch head commit id #71

Closed TheFehr closed 2 years ago

TheFehr commented 2 years ago

I installed the plugin via omf and tried to use gpu (ggp --set-upstream) but it throws an error due to 'origin/36fafe7' not being resolved to a branch.

I then ran __git.current_branch directly and it returned my branch name as well as the commit id of the head.

If there is any more info I can offer to help solve this please let me know.

jhillyerd commented 2 years ago

Can you provide a repo (or steps to create one) that exhibits this issue? Will make it much easier to troubleshoot.

TheFehr commented 2 years ago

The repo I encountered that was a private one from work. Will see if one of my public ones have the same problem.

TheFehr commented 2 years ago

So I checked quickly and I have the exact same behavior with my-zivi

TheFehr commented 2 years ago

I am not sure if it has anything to do with a specific repository, because cloning this one and then executing

__git.current_branch

returns

master
2df7fe2
TheFehr commented 2 years ago

I found the error. The file had \r\n line endings