summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7a2b128)
raw | patch | inline | side by side (parent: 7a2b128)
author | Junio C Hamano <gitster@pobox.com> | |
Sat, 5 Nov 2011 04:31:28 +0000 (21:31 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 7 Nov 2011 22:06:39 +0000 (14:06 -0800) |
This also updates the autogenerated merge title message from "merge commit X"
to "merge tag X", and its effect can be seen in the changes to the test suite.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
to "merge tag X", and its effect can be seen in the changes to the test suite.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff --git a/builtin/merge.c b/builtin/merge.c
index dffd5ec1245865259fd4e72cc304286a1a5b4633..6a44b6d485fd9fd6621ed07d267a95a951695495 100644 (file)
--- a/builtin/merge.c
+++ b/builtin/merge.c
sha1_to_hex(branch_head), remote);
goto cleanup;
}
+ if (!prefixcmp(found_ref, "refs/tags/")) {
+ strbuf_addf(msg, "%s\t\ttag '%s' of .\n",
+ sha1_to_hex(branch_head), remote);
+ goto cleanup;
+ }
if (!prefixcmp(found_ref, "refs/remotes/")) {
strbuf_addf(msg, "%s\t\tremote-tracking branch '%s' of .\n",
sha1_to_hex(branch_head), remote);
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 983e34bec67a4cc4ba1182332e495377cc879ac9..222f7559e92caa2a0bbd128b0bb6bac14e2e113f 100755 (executable)
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
'
cat > expect <<\EOF
-* Merge commit 'reach'
+* Merge tag 'reach'
|\
| \
| \
-*-. \ Merge commit 'octopus-a'; commit 'octopus-b'
+*-. \ Merge tags 'octopus-a' and 'octopus-b'
|\ \ \
* | | | seventh
| | * | octopus-b
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index 3008e4e1210900be3bdc2e28dddd681ce8ec3551..b91d022bc6f1886ead6780387da5a871c2e359ec 100755 (executable)
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
>empty
create_merge_msgs () {
- echo "Merge commit 'c2'" >msg.1-5 &&
- echo "Merge commit 'c2'; commit 'c3'" >msg.1-5-9 &&
+ echo "Merge tag 'c2'" >msg.1-5 &&
+ echo "Merge tags 'c2' and 'c3'" >msg.1-5-9 &&
{
echo "Squashed commit of the following:" &&
echo &&
} >squash.1-5-9 &&
echo >msg.nolog &&
{
- echo "* commit 'c3':" &&
+ echo "* tag 'c3':" &&
echo " commit 3" &&
echo
} >msg.log
index 9114785ef7c850ae2d393bed3565e13f11339ba0..89619cf44608282efa6d75c2ed93cd3bdc4096fc 100755 (executable)
cp exp.subject exp.log &&
echo >>exp.log "" &&
- echo >>exp.log "* commit 'c2':" &&
+ echo >>exp.log "* tag 'c2':" &&
echo >>exp.log " c2"
}
index 9225fa6f025cd9586b46f30464a69ccb57ca6b2a..8e7e0a5865d762c1cb859154c2d4735b9bf8722b 100755 (executable)
git checkout master &&
test_commit master-3 &&
git merge tag-1 &&
- check_oneline "Merge commit Qtag-1Q"
+ check_oneline "Merge tag Qtag-1Q"
'
test_expect_success 'ambiguous tag' '
git checkout master &&
test_commit master-4 &&
git merge ambiguous &&
- check_oneline "Merge commit QambiguousQ"
+ check_oneline "Merge tag QambiguousQ"
'
test_expect_success 'remote-tracking branch' '