New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Git: move current_branch() to core #4420
Git: move current_branch() to core #4420
Conversation
# it's not a symbolic ref, but in a Git repo. | ||
function git_current_branch() { | ||
local ref | ||
ref=$(git symbolic-ref --quiet HEAD 2> /dev/null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- That should be
command git
if you do not mind ;-) - Same on line 71.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't mind at all. Amended.
ffff1fd
to
e809c59
Compare
Added the |
Weird, it seems you re-pushed the exact same commit... maybe a bug with GitHub? |
e809c59
to
4dc89aa
Compare
No, I must have screwed up somehow: the change to add the |
Then I vote for a merge ASAP! |
Ping... can we merge this? @mcornella |
Hi @apjanke, sorry for missing this one. I was going to merge but the commit message is leaking over multiple lines. Please edit that with a line break of separation between the subject and description of the commit. |
Fixes ohmyzsh#4085: core -> plugin dependency issue. Rename it to git_current_branch for clarity that it's git-specific. Update all plugins that were calling it to use new name. Fix variable leaks by making more variables in lib/git.zsh local. Have lib/git.zsh use [[ ]] instead of [ ] everywhere.
4dc89aa
to
9f55213
Compare
Git: move current_branch() to core
w00t |
…to-core Git: move current_branch() to core
Moves the
current_branch()
function from thegit
plugin to the corelib/git.zsh
, since there are other functions in core OMZ or in themes that depend on it, and we don't want any core -> plugin dependencies.Fixes #4085
Fixes #4059
Fixes #331
Fixes #4581