]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-parse-remote.sh
Use symbolic name SHORT_NAME_AMBIGUOUS as error return value
[thirdparty/git.git] / git-parse-remote.sh
index 32f10855b6e94ad891417a476bafd3092135bec7..5f158c613f333026ed42eac1c059b01500ba5e53 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
-. git-sh-setup || die "Not a git archive"
+# git-ls-remote could be called from outside a git managed repository;
+# this would fail in that case and would issue an error message.
+GIT_DIR=$(git-rev-parse --git-dir 2>/dev/null) || :;
 
 get_data_source () {
        case "$1" in