Merge branch 'jk/subtree-do-not-push-if-split-fails'
"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
This commit is contained in:
commit
feffa04437
@ -715,7 +715,8 @@ cmd_push()
|
|||||||
repository=$1
|
repository=$1
|
||||||
refspec=$2
|
refspec=$2
|
||||||
echo "git push using: " $repository $refspec
|
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
|
else
|
||||||
die "'$dir' must already exist. Try 'git subtree add'."
|
die "'$dir' must already exist. Try 'git subtree add'."
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user