symlink git_current_branch to git-branch-current

This commit is contained in:
Matt Hamilton 2015-12-19 09:42:09 -05:00
parent c577d77fc4
commit 08c9987b38
1 changed files with 1 additions and 20 deletions

View File

@ -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

View File

@ -0,0 +1 @@
git_current_branch