Merge branch 'tr/log-full-diff-keep-true-parents'
[gitweb.git] / contrib / subtree / git-subtree.sh
index 2b217675af58f7e225e8efad48e0391f8efe3f88..7d7af03274ee0759c9e915a6ea7b52ecce65cf55 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # git-subtree.sh: split/join git repositories in subdirectories of this one
 #
@@ -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