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
This commit is contained in:
Junio C Hamano 2016-01-22 13:08:45 -08:00
commit a039a79e9d

View File

@ -245,7 +245,10 @@ find_latest_squash()
case "$a" in case "$a" in
START) sq="$b" ;; START) sq="$b" ;;
git-subtree-mainline:) main="$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) END)
if [ -n "$sub" ]; then if [ -n "$sub" ]; then
if [ -n "$main" ]; then if [ -n "$main" ]; then
@ -278,7 +281,10 @@ find_existing_splits()
case "$a" in case "$a" in
START) sq="$b" ;; START) sq="$b" ;;
git-subtree-mainline:) main="$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) END)
debug " Main is: '$main'" debug " Main is: '$main'"
if [ -z "$main" -a -n "$sub" ]; then if [ -z "$main" -a -n "$sub" ]; then