Debian: packaging updates.
[gitweb.git] / git-sh-setup.sh
index 55db795843514571450acf7da600b6aba10c15d4..dbb98842bf6327210c604ae65a128cdfc785b32c 100755 (executable)
 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" ]
+[ -d "$GIT_OBJECT_DIRECTORY/" ]