summaryrefslogtreecommitdiff
path: root/git-status.sh
diff options
context:
space:
mode:
authorLibravatar Peter Anvin <hpa@tazenda.sc.orionmulti.com>2005-10-03 12:04:44 -0700
committerLibravatar Peter Anvin <hpa@tazenda.sc.orionmulti.com>2005-10-03 12:04:44 -0700
commit79a9d8ea0d88a3667ad19be8e705405ab5d896f1 (patch)
tree15d04fe258e969f2a43aaff3c292286984d0147c /git-status.sh
parentBetter handling of exec extension in the git wrapper script (diff)
parentPost 0.99.8 master branch (diff)
downloadtgif-79a9d8ea0d88a3667ad19be8e705405ab5d896f1.tar.xz
Merge with master.kernel.org:/pub/scm/git/git.git
Diffstat (limited to 'git-status.sh')
-rwxr-xr-xgit-status.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/git-status.sh b/git-status.sh
index 621fa49d2b..44398d760c 100755
--- a/git-status.sh
+++ b/git-status.sh
@@ -31,15 +31,15 @@ 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" ;;
esac
-git-update-index --refresh >/dev/null 2>&1
+git-update-index -q --unmerged --refresh || exit
-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/^://' |