X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-parse-remote.sh;h=5f158c613f333026ed42eac1c059b01500ba5e53;hb=4c691724f175573a2dc4118782744cb0e852ab41;hp=aea7b0e5497fb0727533ea750503193fe308374a;hpb=8ac3a61f59173d4a9a328518be83a25df610a5ef;p=git.git diff --git a/git-parse-remote.sh b/git-parse-remote.sh index aea7b0e5..5f158c61 100755 --- a/git-parse-remote.sh +++ b/git-parse-remote.sh @@ -1,6 +1,8 @@ #!/bin/sh -. git-sh-setup +# 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