Merge branch 'tr/sha1-file-silence-loose-object-info-under-prune-race'
[gitweb.git] / contrib / subtree / git-subtree.sh
index 57013763ec5abc95f414ce919907dc074d9a99b5..51ae932e5edc54db32fca93e8f6f8aca1bea32f4 100755 (executable)
@@ -715,7 +715,8 @@ cmd_push()
            repository=$1
            refspec=$2
            echo "git push using: " $repository $refspec
-           git push $repository $(git subtree split --prefix=$prefix):refs/heads/$refspec
+           localrev=$(git subtree split --prefix="$prefix") || die
+           git push $repository $localrev:refs/heads/$refspec
        else
            die "'$dir' must already exist. Try 'git subtree add'."
        fi