Merge branch 'jk/subtree-do-not-push-if-split-fails' into maint

* jk/subtree-do-not-push-if-split-fails:
  contrib/subtree: don't delete remote branches if split fails
This commit is contained in:
Junio C Hamano
2013-06-27 14:37:44 -07:00

View File

@@ -715,7 +715,8 @@ cmd_push()
if [ -e "$dir" ]; then
repository=$1
refspec=$2
echo "git push using: " $repository $refspec
echo "git push using: " $repository $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'."