format-patch: do not abuse 3-dash marker line.
[gitweb.git] / git-sh-setup.sh
index e343349c0087aefbb42d17ace9102a72d2fb437a..b4f10224baf8328a9d6efa761b025450df414bb2 100755 (executable)
@@ -19,10 +19,5 @@ die() {
        exit 1
 }
 
-case "$(GIT_DIR="$GIT_DIR" git-symbolic-ref HEAD 2>/dev/null)" in
-refs/*)        : ;;
-*)     false ;;
-esac &&
-[ -d "$GIT_DIR/refs" ] &&
-[ -d "$GIT_OBJECT_DIRECTORY/" ] ||
-       die "Not a git repository."
+# Make sure we are in a valid repository of a vintage we understand.
+GIT_DIR="$GIT_DIR" git-var GIT_AUTHOR_IDENT >/dev/null || exit