Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jk/subtree-do-not-push-if-split-fails' into maint
author
Junio C Hamano
<gitster@pobox.com>
Thu, 27 Jun 2013 21:37:44 +0000
(14:37 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 27 Jun 2013 21:37:44 +0000
(14:37 -0700)
* jk/subtree-do-not-push-if-split-fails:
contrib/subtree: don't delete remote branches if split fails
contrib/subtree/git-subtree.sh
patch
|
blob
|
history
raw
(from parent 1:
0fb2c97
)
diff --git
a/contrib/subtree/git-subtree.sh
b/contrib/subtree/git-subtree.sh
index 8a23f58ba04c4b1402c66d03db69d0c109c90b58..10daa8b0eb3352305347354d09ef443993af7809 100755
(executable)
--- 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