fix branch name.

branches can have '/'. So, just remove the 'refs/heads' prefix.
master
Victor Seva 12 years ago
parent 6b576b46cf
commit ea2da1ea6f
  1. 2
      gitstatus.sh

@ -16,7 +16,7 @@ gitsym=`git symbolic-ref HEAD`
case "$gitsym" in fatal*) exit 0 ;; esac
# the current branch is the tail end of the symbolic reference
branch="${gitsym##*/}" # get the basename after "refs/head/"
branch="${gitsym##refs/heads/}" # get the basename after "refs/heads/"
tmp="/tmp/$$-gitstatus.out"
trap "rm -f \"$tmp\"" EXIT

Loading…
Cancel
Save