Skip to content

Commit

Permalink
Merge branch 'jk/subtree-do-not-push-if-split-fails'
Browse files Browse the repository at this point in the history
"git subtree" (in contrib/) had one codepath with loose error
checks to lose data at the remote side.

* jk/subtree-do-not-push-if-split-fails:
  contrib/subtree: don't delete remote branches if split fails
  • Loading branch information
Junio C Hamano committed May 29, 2013
2 parents 31d176d + 3212d56 commit feffa04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contrib/subtree/git-subtree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit feffa04

Please sign in to comment.