diff options
Diffstat (limited to 'git-status.sh')
-rwxr-xr-x | git-status.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git-status.sh b/git-status.sh index 621fa49d2..ca9a15459 100755 --- a/git-status.sh +++ b/git-status.sh @@ -31,7 +31,7 @@ report () { [ "$header" ] } -branch=`readlink "$GIT_DIR/HEAD"` +branch=$(GIT_DIR="$GIT_DIR" git-symbolic-ref HEAD) case "$branch" in refs/heads/master) ;; *) echo "# On branch $branch" ;; @@ -39,7 +39,7 @@ esac git-update-index --refresh >/dev/null 2>&1 -if test -f "$GIT_DIR/HEAD" +if GIT_DIR="$GIT_DIR" git-rev-parse --verify HEAD >/dev/null 2>&1 then git-diff-index -M --cached HEAD | sed 's/^://' | |