diff options
-rwxr-xr-x | git-sh-setup.sh | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/git-sh-setup.sh b/git-sh-setup.sh index e343349c00..b4f10224ba 100755 --- a/git-sh-setup.sh +++ b/git-sh-setup.sh @@ -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 |