File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -469,4 +469,43 @@ test_expect_success 'merge-msg lots of commits' '
469
469
test_cmp expected actual
470
470
'
471
471
472
+ test_expect_success ' merge-msg with "merging" an annotated tag' '
473
+ test_config merge.log true &&
474
+
475
+ git checkout master^0 &&
476
+ git commit --allow-empty -m "One step ahead" &&
477
+ git tag -a -m "An annotated one" annote HEAD &&
478
+
479
+ git checkout master &&
480
+ git fetch . annote &&
481
+
482
+ git fmt-merge-msg <.git/FETCH_HEAD >actual &&
483
+ {
484
+ cat <<-\EOF
485
+ Merge tag ' \' ' annote' \' '
486
+
487
+ An annotated one
488
+
489
+ * tag ' \' ' annote' \' ' :
490
+ One step ahead
491
+ EOF
492
+ } >expected &&
493
+ test_cmp expected actual &&
494
+
495
+ test_when_finished "git reset --hard" &&
496
+ annote=$(git rev-parse annote) &&
497
+ git merge --no-commit $annote &&
498
+ {
499
+ cat <<-EOF
500
+ Merge tag ' \' ' $annote' \' '
501
+
502
+ An annotated one
503
+
504
+ * tag ' \' ' $annote' \' ' :
505
+ One step ahead
506
+ EOF
507
+ } >expected &&
508
+ test_cmp expected .git/MERGE_MSG
509
+ '
510
+
472
511
test_done
You can’t perform that action at this time.
0 commit comments