symlink git_current_branch to git-branch-current
This commit is contained in:
parent
c577d77fc4
commit
08c9987b38
@ -1,20 +0,0 @@
|
||||
#
|
||||
# Displays the current Git branch.
|
||||
#
|
||||
# Authors:
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
if ! git rev-parse 2> /dev/null; then
|
||||
print "$0: not a repository: $PWD" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
local ref="$(git symbolic-ref HEAD 2> /dev/null)"
|
||||
|
||||
if [[ -n "$ref" ]]; then
|
||||
print "${ref#refs/heads/}"
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
1
modules/git/functions/git-branch-current
Symbolic link
1
modules/git/functions/git-branch-current
Symbolic link
@ -0,0 +1 @@
|
||||
git_current_branch
|
Reference in New Issue
Block a user