]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5801/git-remote-testgit
transport-helper: send "true" value for object-format option
[thirdparty/git.git] / t / t5801 / git-remote-testgit
index 1544d6dc6ba19170a1dfdb8ded299530f70be1de..c5b10f57751b259f297be3c4dcb673f32994017b 100755 (executable)
@@ -12,6 +12,11 @@ url=$2
 
 dir="$GIT_DIR/testgit/$alias"
 
+if ! git rev-parse --is-inside-git-dir
+then
+       exit 1
+fi
+
 h_refspec="refs/heads/*:refs/testgit/$alias/heads/*"
 t_refspec="refs/tags/*:refs/testgit/$alias/tags/*"
 
@@ -25,6 +30,7 @@ GIT_DIR="$url/.git"
 export GIT_DIR
 
 force=
+object_format=
 
 mkdir -p "$dir"
 
@@ -56,7 +62,8 @@ do
                echo
                ;;
        list)
-               echo ":object-format $(git rev-parse --show-object-format=storage)"
+               test -n "$object_format" &&
+                       echo ":object-format $(git rev-parse --show-object-format=storage)"
                git for-each-ref --format='? %(refname)' 'refs/heads/' 'refs/tags/'
                head=$(git symbolic-ref HEAD)
                echo "@$head HEAD"