diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-06-27 14:37:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-27 14:37:44 -0700 |
commit | 7f3447cce83ebe80c498a4455c03b0c8f37ac938 (patch) | |
tree | bdb5459d6795e2e3c89583e5fbba9223e43a7de0 /contrib | |
parent | 0fb2c97c206958a13e8979187b7b3cc31d389126 (diff) | |
parent | 3212d56ce528a86170f7809659f80a8769a5875f (diff) | |
download | git-7f3447cce83ebe80c498a4455c03b0c8f37ac938.tar.gz git-7f3447cce83ebe80c498a4455c03b0c8f37ac938.tar.xz |
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
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/subtree/git-subtree.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh index 8a23f58ba..10daa8b0e 100755 --- a/contrib/subtree/git-subtree.sh +++ b/contrib/subtree/git-subtree.sh @@ -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 |