Skip to content

Commit

Permalink
Merge branch 'rm/subtree-unwrap-tags'
Browse files Browse the repository at this point in the history
"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
  • Loading branch information
Junio C Hamano committed Jan 22, 2016
2 parents 3ee1e0f + 5d65fe3 commit a039a79
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions contrib/subtree/git-subtree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a039a79

Please sign in to comment.