summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-01-22 13:08:45 -0800
committerJunio C Hamano <gitster@pobox.com>2016-01-22 13:08:45 -0800
commita039a79e9d00fed442f31ce69054e98e7dd1fc69 (patch)
tree6b5399f44f47489680658b32925f890362a63300 /contrib
parent3ee1e0fe11e2eb617170d0487fccfffc67f2b82b (diff)
parent5d65fe312e22594b7fec7349945fb0072987716b (diff)
downloadgit-a039a79e9d00fed442f31ce69054e98e7dd1fc69.tar.gz
Merge branch 'rm/subtree-unwrap-tags'
"git subtree" (in contrib/) records the tag object name in the commit log message when a subtree is added using a tag, without peeling it down to the underlying commit. The tag needs to be peeled when "git subtree split" wants to work on the commit, but the command forgot to do so. * rm/subtree-unwrap-tags: contrib/subtree: unwrap tag refs
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/subtree/git-subtree.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index edf36f8c36..efbdb720e6 100755
--- a/contrib/subtree/git-subtree.sh
+++ b/contrib/subtree/git-subtree.sh
@@ -245,7 +245,10 @@ find_latest_squash()
case "$a" in
START) sq="$b" ;;
git-subtree-mainline:) main="$b" ;;
- git-subtree-split:) sub="$b" ;;
+ git-subtree-split:)
+ sub="$(git rev-parse "$b^0")" ||
+ die "could not rev-parse split hash $b from commit $sq"
+ ;;
END)
if [ -n "$sub" ]; then
if [ -n "$main" ]; then
@@ -278,7 +281,10 @@ find_existing_splits()
case "$a" in
START) sq="$b" ;;
git-subtree-mainline:) main="$b" ;;
- git-subtree-split:) sub="$b" ;;
+ git-subtree-split:)
+ sub="$(git rev-parse "$b^0")" ||
+ die "could not rev-parse split hash $b from commit $sq"
+ ;;
END)
debug " Main is: '$main'"
if [ -z "$main" -a -n "$sub" ]; then