aboutsummaryrefslogtreecommitdiff
path: root/git-sh-setup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-sh-setup.sh')
-rwxr-xr-xgit-sh-setup.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/git-sh-setup.sh b/git-sh-setup.sh
index 55db79584..a0172686a 100755
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
@@ -13,10 +13,13 @@
unset CDPATH
die() {
- echo "$@" >&2
+ echo >&2 "$@"
exit 1
}
-[ -h "$GIT_DIR/HEAD" ] &&
+case "$(GIT_DIR="$GIT_DIR" git-symbolic-ref HEAD 2>/dev/null)" in
+refs/*) : ;;
+*) false ;;
+esac &&
[ -d "$GIT_DIR/refs" ] &&
[ -d "$GIT_OBJECT_DIRECTORY/00" ]