From ea2da1ea6fb0de25bd00e6ed9b21e1bd522d85fe Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Thu, 30 Jan 2014 15:39:40 +0100 Subject: [PATCH] fix branch name. branches can have '/'. So, just remove the 'refs/heads' prefix. --- gitstatus.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitstatus.sh b/gitstatus.sh index 1feeb8a..49e82d7 100755 --- a/gitstatus.sh +++ b/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