aboutsummaryrefslogtreecommitdiff
path: root/t/t6200-fmt-merge-msg.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-04-01 12:51:50 -0700
committerJunio C Hamano <gitster@pobox.com>2013-04-01 12:51:50 -0700
commita38d3d76b6d1c70b566633e1629aa3b0e856810e (patch)
tree86ebeb9b69d2bf4b205b2c7ee31089aa405520f7 /t/t6200-fmt-merge-msg.sh
parent9a94dba012b6b892c97d6eaf10d26f256d8dbfde (diff)
downloadgit-a38d3d76b6d1c70b566633e1629aa3b0e856810e.tar.gz
git-a38d3d76b6d1c70b566633e1629aa3b0e856810e.tar.xz
t6200: test message for merging of an annotated tag
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6200-fmt-merge-msg.sh')
-rwxr-xr-xt/t6200-fmt-merge-msg.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/t/t6200-fmt-merge-msg.sh b/t/t6200-fmt-merge-msg.sh
index f84bb0c81..f73eceabf 100755
--- a/t/t6200-fmt-merge-msg.sh
+++ b/t/t6200-fmt-merge-msg.sh
@@ -469,4 +469,43 @@ test_expect_success 'merge-msg lots of commits' '
test_cmp expected actual
'
+test_expect_success 'merge-msg with "merging" an annotated tag' '
+ test_config merge.log true &&
+
+ git checkout master^0 &&
+ git commit --allow-empty -m "One step ahead" &&
+ git tag -a -m "An annotated one" annote HEAD &&
+
+ git checkout master &&
+ git fetch . annote &&
+
+ git fmt-merge-msg <.git/FETCH_HEAD >actual &&
+ {
+ cat <<-\EOF
+ Merge tag '\''annote'\''
+
+ An annotated one
+
+ * tag '\''annote'\'':
+ One step ahead
+ EOF
+ } >expected &&
+ test_cmp expected actual &&
+
+ test_when_finished "git reset --hard" &&
+ annote=$(git rev-parse annote) &&
+ git merge --no-commit $annote &&
+ {
+ cat <<-EOF
+ Merge tag '\''$annote'\''
+
+ An annotated one
+
+ * tag '\''$annote'\'':
+ One step ahead
+ EOF
+ } >expected &&
+ test_cmp expected .git/MERGE_MSG
+'
+
test_done