fmt-merge-msg: stop treating `master` specially
In the context of many projects renaming their primary branch names away from `master`, Git wants to stop treating the `master` branch specially. Let's start with `git fmt-merge-msg`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Jun 23, 2020 at 22:33 UTC
489947cee5095b168cbac111ff7bd1eadbbd90dd
29 files changed
+94
-97
fmt-merge-msg.c
+1
-4
@@ -451,10 +451,7 @@ static void fmt_merge_msg_title(struct strbuf *out,
451
strbuf_addf(out, " of %s", srcs.items[i].string);
452
}
453
454
- if (!strcmp("master", current_branch))
455
- strbuf_addch(out, '\n');
456
- else
457
- strbuf_addf(out, " into %s\n", current_branch);
454
+ strbuf_addf(out, " into %s\n", current_branch);
455
}
456
457
static void fmt_tag_signature(struct strbuf *tagbuf,
t/t1507-rev-parse-upstream.sh
+1
-1
@@ -137,7 +137,7 @@ test_expect_success 'merge my-side@{u} records the correct name' '
137
git branch -t new my-side@{u} &&
138
git merge -s ours new@{u} &&
139
git show -s --pretty=tformat:%s >actual &&
140
- echo "Merge remote-tracking branch ${SQ}origin/side${SQ}" >expect &&
140
+ echo "Merge remote-tracking branch ${SQ}origin/side${SQ} into master" >expect &&
141
test_cmp expect actual
142
)
143
'
t/t4013-diff-various.sh
+2
-2
@@ -117,12 +117,12 @@ test_expect_success setup '
117
118
: <<\EOF
119
! [initial] Initial
120
- * [master] Merge branch 'side'
120
+ * [master] Merge branch 'side' into master
121
! [rearrange] Rearranged lines in dir/sub
122
! [side] Side
123
----
124
+ [rearrange] Rearranged lines in dir/sub
125
- - [master] Merge branch 'side'
125
+ - [master] Merge branch 'side' into master
126
* + [side] Side
127
* [master^] Third
128
* [master~2] Second
t/t4013/diff.log_--decorate=full_--all
+1
-1
@@ -31,7 +31,7 @@ Merge: 9a6d494 c7a2ab9
31
Author: A U Thor <author@example.com>
32
Date: Mon Jun 26 00:04:00 2006 +0000
33
34
- Merge branch 'side'
34
+ Merge branch 'side' into master
35
36
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a (refs/heads/side)
37
Author: A U Thor <author@example.com>
t/t4013/diff.log_--decorate_--all
+1
-1
@@ -31,7 +31,7 @@ Merge: 9a6d494 c7a2ab9
31
Author: A U Thor <author@example.com>
32
Date: Mon Jun 26 00:04:00 2006 +0000
33
34
- Merge branch 'side'
34
+ Merge branch 'side' into master
35
36
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a (side)
37
Author: A U Thor <author@example.com>
t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_
+1
-1
@@ -4,7 +4,7 @@ Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000
6
7
- Merge branch 'side'
7
+ Merge branch 'side' into master
8
9
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
10
Author: A U Thor <author@example.com>
t/t4013/diff.log_--patch-with-stat_master
+1
-1
@@ -4,7 +4,7 @@ Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000
6
7
- Merge branch 'side'
7
+ Merge branch 'side' into master
8
9
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
10
Author: A U Thor <author@example.com>
t/t4013/diff.log_--patch-with-stat_master_--_dir_
+1
-1
@@ -4,7 +4,7 @@ Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000
6
7
- Merge branch 'side'
7
+ Merge branch 'side' into master
8
9
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
10
Author: A U Thor <author@example.com>
t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master
+1
-1
@@ -4,7 +4,7 @@ Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000
6
7
- Merge branch 'side'
7
+ Merge branch 'side' into master
8
9
dir/sub | 2 ++
10
file0 | 3 +++
t/t4013/diff.log_--root_--patch-with-stat_--summary_master
+1
-1
@@ -4,7 +4,7 @@ Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000
6
7
- Merge branch 'side'
7
+ Merge branch 'side' into master
8
9
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
10
Author: A U Thor <author@example.com>
t/t4013/diff.log_--root_--patch-with-stat_master
+1
-1
@@ -4,7 +4,7 @@ Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000
6
7
- Merge branch 'side'
7
+ Merge branch 'side' into master
8
9
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
10
Author: A U Thor <author@example.com>
t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master
+1
-1
@@ -4,7 +4,7 @@ Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000
6
7
- Merge branch 'side'
7
+ Merge branch 'side' into master
8
9
dir/sub | 2 ++
10
file0 | 3 +++
t/t4013/diff.log_--root_-p_master
+1
-1
@@ -4,7 +4,7 @@ Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000
6
7
- Merge branch 'side'
7
+ Merge branch 'side' into master
8
9
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
10
Author: A U Thor <author@example.com>
t/t4013/diff.log_--root_master
+1
-1
@@ -4,7 +4,7 @@ Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000
6
7
- Merge branch 'side'
7
+ Merge branch 'side' into master
8
9
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
10
Author: A U Thor <author@example.com>
t/t4013/diff.log_-m_-p_--first-parent_master
+1
-1
@@ -4,7 +4,7 @@ Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000
6
7
- Merge branch 'side'
7
+ Merge branch 'side' into master
8
9
diff --git a/dir/sub b/dir/sub
10
index cead32e..992913c 100644
t/t4013/diff.log_-m_-p_master
+2
-2
@@ -4,7 +4,7 @@ Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000
6
7
- Merge branch 'side'
7
+ Merge branch 'side' into master
8
9
diff --git a/dir/sub b/dir/sub
10
index cead32e..992913c 100644
@@ -33,7 +33,7 @@ Merge: 9a6d494 c7a2ab9
33
Author: A U Thor <author@example.com>
34
Date: Mon Jun 26 00:04:00 2006 +0000
35
36
- Merge branch 'side'
36
+ Merge branch 'side' into master
37
38
diff --git a/dir/sub b/dir/sub
39
index 7289e35..992913c 100644
t/t4013/diff.log_-p_--first-parent_master
+1
-1
@@ -4,7 +4,7 @@ Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000
6
7
- Merge branch 'side'
7
+ Merge branch 'side' into master
8
9
commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0
10
Author: A U Thor <author@example.com>
t/t4013/diff.log_-p_master
+1
-1
@@ -4,7 +4,7 @@ Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000
6
7
- Merge branch 'side'
7
+ Merge branch 'side' into master
8
9
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
10
Author: A U Thor <author@example.com>
t/t4013/diff.log_master
+1
-1
@@ -4,7 +4,7 @@ Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000
6
7
- Merge branch 'side'
7
+ Merge branch 'side' into master
8
9
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
10
Author: A U Thor <author@example.com>
t/t4013/diff.show_--first-parent_master
+1
-1
@@ -4,7 +4,7 @@ Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000
6
7
- Merge branch 'side'
7
+ Merge branch 'side' into master
8
9
diff --git a/dir/sub b/dir/sub
10
index cead32e..992913c 100644
t/t4013/diff.show_-c_master
+1
-1
@@ -4,7 +4,7 @@ Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000
6
7
- Merge branch 'side'
7
+ Merge branch 'side' into master
8
9
diff --combined dir/sub
10
index cead32e,7289e35..992913c
t/t4013/diff.show_-m_master
+2
-2
@@ -4,7 +4,7 @@ Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000
6
7
- Merge branch 'side'
7
+ Merge branch 'side' into master
8
9
diff --git a/dir/sub b/dir/sub
10
index cead32e..992913c 100644
@@ -33,7 +33,7 @@ Merge: 9a6d494 c7a2ab9
33
Author: A U Thor <author@example.com>
34
Date: Mon Jun 26 00:04:00 2006 +0000
35
36
- Merge branch 'side'
36
+ Merge branch 'side' into master
37
38
diff --git a/dir/sub b/dir/sub
39
index 7289e35..992913c 100644
t/t4013/diff.show_master
+1
-1
@@ -4,7 +4,7 @@ Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000
6
7
- Merge branch 'side'
7
+ Merge branch 'side' into master
8
9
diff --cc dir/sub
10
index cead32e,7289e35..992913c
t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master
+1
-1
@@ -4,7 +4,7 @@ Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000
6
7
- Merge branch 'side'
7
+ Merge branch 'side' into master
8
9
dir/sub | 2 ++
10
file0 | 3 +++
t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master
+1
-1
@@ -4,7 +4,7 @@ Merge: 9a6d494 c7a2ab9
4
Author: A U Thor <author@example.com>
5
Date: Mon Jun 26 00:04:00 2006 +0000
6
7
- Merge branch 'side'
7
+ Merge branch 'side' into master
8
9
dir/sub | 2 ++
10
file0 | 3 +++
t/t4202-log.sh
+36
-36
@@ -483,7 +483,7 @@ test_expect_success 'set up merge history' '
483
'
484
485
cat > expect <<\EOF
486
-* Merge branch 'side'
486
+* Merge branch 'side' into master
487
|\
488
| * side-2
489
| * side-1
@@ -502,7 +502,7 @@ test_expect_success 'log --graph with merge' '
502
'
503
504
cat > expect <<\EOF
505
-| | | * Merge branch 'side'
505
+| | | * Merge branch 'side' into master
506
| | | |\
507
| | | | * side-2
508
| | | | * side-1
@@ -521,7 +521,7 @@ test_expect_success 'log --graph --line-prefix="| | | " with merge' '
521
'
522
523
cat > expect.colors <<\EOF
524
-* Merge branch 'side'
524
+* Merge branch 'side' into master
525
<BLUE>|<RESET><CYAN>\<RESET>
526
<BLUE>|<RESET> * side-2
527
<BLUE>|<RESET> * side-1
@@ -555,7 +555,7 @@ cat > expect <<\EOF
555
|\ Merge: A B
556
| | Author: A U Thor <author@example.com>
557
| |
558
-| | Merge branch 'side'
558
+| | Merge branch 'side' into master
559
| |
560
| * commit tags/side-2
561
| | Author: A U Thor <author@example.com>
@@ -632,11 +632,11 @@ test_expect_success 'set up more tangled history' '
632
'
633
634
cat > expect <<\EOF
635
-* Merge tag 'reach'
635
+* Merge tag 'reach' into master
636
|\
637
| \
638
| \
639
-*-. \ Merge tags 'octopus-a' and 'octopus-b'
639
+*-. \ Merge tags 'octopus-a' and 'octopus-b' into master
640
|\ \ \
641
* | | | seventh
642
| | * | octopus-b
@@ -646,14 +646,14 @@ cat > expect <<\EOF
646
|/ /
647
| * reach
648
|/
649
-* Merge branch 'tangle'
649
+* Merge branch 'tangle' into master
650
|\
651
| * Merge branch 'side' (early part) into tangle
652
| |\
653
| * \ Merge branch 'master' (early part) into tangle
654
| |\ \
655
| * | | tangle-a
656
-* | | | Merge branch 'side'
656
+* | | | Merge branch 'side' into master
657
|\ \ \ \
658
| * | | | side-2
659
| | |_|/
@@ -735,16 +735,16 @@ test_expect_success 'log.decorate configuration' '
735
736
test_expect_success 'decorate-refs with glob' '
737
cat >expect.decorate <<-\EOF &&
738
- Merge-tag-reach
739
- Merge-tags-octopus-a-and-octopus-b
738
+ Merge-tag-reach-into-master
739
+ Merge-tags-octopus-a-and-octopus-b-into-master
740
seventh
741
octopus-b (octopus-b)
742
octopus-a (octopus-a)
743
reach
744
EOF
745
cat >expect.no-decorate <<-\EOF &&
746
- Merge-tag-reach
747
- Merge-tags-octopus-a-and-octopus-b
746
+ Merge-tag-reach-into-master
747
+ Merge-tags-octopus-a-and-octopus-b-into-master
748
seventh
749
octopus-b
750
octopus-a
@@ -765,8 +765,8 @@ test_expect_success 'decorate-refs with glob' '
765
766
test_expect_success 'decorate-refs without globs' '
767
cat >expect.decorate <<-\EOF &&
768
- Merge-tag-reach
769
- Merge-tags-octopus-a-and-octopus-b
768
+ Merge-tag-reach-into-master
769
+ Merge-tags-octopus-a-and-octopus-b-into-master
770
seventh
771
octopus-b
772
octopus-a
@@ -779,8 +779,8 @@ test_expect_success 'decorate-refs without globs' '
779
780
test_expect_success 'multiple decorate-refs' '
781
cat >expect.decorate <<-\EOF &&
782
- Merge-tag-reach
783
- Merge-tags-octopus-a-and-octopus-b
782
+ Merge-tag-reach-into-master
783
+ Merge-tags-octopus-a-and-octopus-b-into-master
784
seventh
785
octopus-b (octopus-b)
786
octopus-a (octopus-a)
@@ -794,8 +794,8 @@ test_expect_success 'multiple decorate-refs' '
794
795
test_expect_success 'decorate-refs-exclude with glob' '
796
cat >expect.decorate <<-\EOF &&
797
- Merge-tag-reach (HEAD -> master)
798
- Merge-tags-octopus-a-and-octopus-b
797
+ Merge-tag-reach-into-master (HEAD -> master)
798
+ Merge-tags-octopus-a-and-octopus-b-into-master
799
seventh (tag: seventh)
800
octopus-b (tag: octopus-b)
801
octopus-a (tag: octopus-a)
@@ -811,8 +811,8 @@ test_expect_success 'decorate-refs-exclude with glob' '
811
812
test_expect_success 'decorate-refs-exclude without globs' '
813
cat >expect.decorate <<-\EOF &&
814
- Merge-tag-reach (HEAD -> master)
815
- Merge-tags-octopus-a-and-octopus-b
814
+ Merge-tag-reach-into-master (HEAD -> master)
815
+ Merge-tags-octopus-a-and-octopus-b-into-master
816
seventh (tag: seventh)
817
octopus-b (tag: octopus-b, octopus-b)
818
octopus-a (tag: octopus-a, octopus-a)
@@ -828,8 +828,8 @@ test_expect_success 'decorate-refs-exclude without globs' '
828
829
test_expect_success 'multiple decorate-refs-exclude' '
830
cat >expect.decorate <<-\EOF &&
831
- Merge-tag-reach (HEAD -> master)
832
- Merge-tags-octopus-a-and-octopus-b
831
+ Merge-tag-reach-into-master (HEAD -> master)
832
+ Merge-tags-octopus-a-and-octopus-b-into-master
833
seventh (tag: seventh)
834
octopus-b (tag: octopus-b)
835
octopus-a (tag: octopus-a)
@@ -851,8 +851,8 @@ test_expect_success 'multiple decorate-refs-exclude' '
851
852
test_expect_success 'decorate-refs and decorate-refs-exclude' '
853
cat >expect.no-decorate <<-\EOF &&
854
- Merge-tag-reach (master)
855
- Merge-tags-octopus-a-and-octopus-b
854
+ Merge-tag-reach-into-master (master)
855
+ Merge-tags-octopus-a-and-octopus-b-into-master
856
seventh
857
octopus-b
858
octopus-a
@@ -866,8 +866,8 @@ test_expect_success 'decorate-refs and decorate-refs-exclude' '
866
867
test_expect_success 'deocrate-refs and log.excludeDecoration' '
868
cat >expect.decorate <<-\EOF &&
869
- Merge-tag-reach (master)
870
- Merge-tags-octopus-a-and-octopus-b
869
+ Merge-tag-reach-into-master (master)
870
+ Merge-tags-octopus-a-and-octopus-b-into-master
871
seventh
872
octopus-b (octopus-b)
873
octopus-a (octopus-a)
@@ -881,10 +881,10 @@ test_expect_success 'deocrate-refs and log.excludeDecoration' '
881
882
test_expect_success 'decorate-refs-exclude and simplify-by-decoration' '
883
cat >expect.decorate <<-\EOF &&
884
- Merge-tag-reach (HEAD -> master)
884
+ Merge-tag-reach-into-master (HEAD -> master)
885
reach (tag: reach, reach)
886
seventh (tag: seventh)
887
- Merge-branch-tangle
887
+ Merge-branch-tangle-into-master
888
Merge-branch-side-early-part-into-tangle (tangle)
889
tangle-a (tag: tangle-a)
890
EOF
@@ -1068,7 +1068,7 @@ cat >expect <<\EOF
1068
|\ Merge: MERGE_PARENTS
1069
| | Author: A U Thor <author@example.com>
1070
| |
1071
-| | Merge branch 'tangle'
1071
+| | Merge branch 'tangle' into master
1072
| |
1073
| * commit COMMIT_OBJECT_NAME
1074
| |\ Merge: MERGE_PARENTS
@@ -1102,7 +1102,7 @@ cat >expect <<\EOF
1102
|\ \ \ \ Merge: MERGE_PARENTS
1103
| | | | | Author: A U Thor <author@example.com>
1104
| | | | |
1105
-| | | | | Merge branch 'side'
1105
+| | | | | Merge branch 'side' into master
1106
| | | | |
1107
| * | | | commit COMMIT_OBJECT_NAME
1108
| | |_|/ Author: A U Thor <author@example.com>
@@ -1343,7 +1343,7 @@ cat >expect <<\EOF
1343
*** |\ Merge: MERGE_PARENTS
1344
*** | | Author: A U Thor <author@example.com>
1345
*** | |
1346
-*** | | Merge branch 'tangle'
1346
+*** | | Merge branch 'tangle' into master
1347
*** | |
1348
*** | * commit COMMIT_OBJECT_NAME
1349
*** | |\ Merge: MERGE_PARENTS
@@ -1377,7 +1377,7 @@ cat >expect <<\EOF
1377
*** |\ \ \ \ Merge: MERGE_PARENTS
1378
*** | | | | | Author: A U Thor <author@example.com>
1379
*** | | | | |
1380
-*** | | | | | Merge branch 'side'
1380
+*** | | | | | Merge branch 'side' into master
1381
*** | | | | |
1382
*** | * | | | commit COMMIT_OBJECT_NAME
1383
*** | | |_|/ Author: A U Thor <author@example.com>
@@ -1540,8 +1540,8 @@ cat >expect <<-\EOF
1540
* reach
1541
|
1542
| A reach.t
1543
-* Merge branch 'tangle'
1544
-* Merge branch 'side'
1543
+* Merge branch 'tangle' into master
1544
+* Merge branch 'side' into master
1545
|\
1546
| * side-2
1547
|
@@ -1562,8 +1562,8 @@ cat >expect <<-\EOF
1562
* reach
1563
|
1564
| reach.t
1565
-* Merge branch 'tangle'
1566
-* Merge branch 'side'
1565
+* Merge branch 'tangle' into master
1566
+* Merge branch 'side' into master
1567
|\
1568
| * side-2
1569
|
t/t6200-fmt-merge-msg.sh
+18
-18
@@ -79,7 +79,7 @@ test_expect_success GPG 'set up a signed tag' '
79
'
80
81
test_expect_success 'message for merging local branch' '
82
- echo "Merge branch ${apos}left${apos}" >expected &&
82
+ echo "Merge branch ${apos}left${apos} into master" >expected &&
83
84
git checkout master &&
85
git fetch . left &&
@@ -107,7 +107,7 @@ test_expect_success GPG 'message for merging local tag signed by unknown key' '
107
'
108
109
test_expect_success 'message for merging external branch' '
110
- echo "Merge branch ${apos}left${apos} of $(pwd)" >expected &&
110
+ echo "Merge branch ${apos}left${apos} of $(pwd) into master" >expected &&
111
112
git checkout master &&
113
git fetch "$(pwd)" left &&
@@ -118,7 +118,7 @@ test_expect_success 'message for merging external branch' '
118
119
test_expect_success '[merge] summary/log configuration' '
120
cat >expected <<-EOF &&
121
- Merge branch ${apos}left${apos}
121
+ Merge branch ${apos}left${apos} into master
122
123
# By Another Author (3) and A U Thor (2)
124
# Via Another Committer
@@ -160,7 +160,7 @@ test_expect_success 'setup FETCH_HEAD' '
160
161
test_expect_success 'merge.log=3 limits shortlog length' '
162
cat >expected <<-EOF &&
163
- Merge branch ${apos}left${apos}
163
+ Merge branch ${apos}left${apos} into master
164
165
# By Another Author (3) and A U Thor (2)
166
# Via Another Committer
@@ -177,7 +177,7 @@ test_expect_success 'merge.log=3 limits shortlog length' '
177
178
test_expect_success 'merge.log=5 shows all 5 commits' '
179
cat >expected <<-EOF &&
180
- Merge branch ${apos}left${apos}
180
+ Merge branch ${apos}left${apos} into master
181
182
# By Another Author (3) and A U Thor (2)
183
# Via Another Committer
@@ -195,7 +195,7 @@ test_expect_success 'merge.log=5 shows all 5 commits' '
195
196
test_expect_success '--log=5 with custom comment character' '
197
cat >expected <<-EOF &&
198
- Merge branch ${apos}left${apos}
198
+ Merge branch ${apos}left${apos} into master
199
200
x By Another Author (3) and A U Thor (2)
201
x Via Another Committer
@@ -212,14 +212,14 @@ test_expect_success '--log=5 with custom comment character' '
212
'
213
214
test_expect_success 'merge.log=0 disables shortlog' '
215
- echo "Merge branch ${apos}left${apos}" >expected &&
215
+ echo "Merge branch ${apos}left${apos} into master" >expected &&
216
git -c merge.log=0 fmt-merge-msg <.git/FETCH_HEAD >actual &&
217
test_cmp expected actual
218
'
219
220
test_expect_success '--log=3 limits shortlog length' '
221
cat >expected <<-EOF &&
222
- Merge branch ${apos}left${apos}
222
+ Merge branch ${apos}left${apos} into master
223
224
# By Another Author (3) and A U Thor (2)
225
# Via Another Committer
@@ -236,7 +236,7 @@ test_expect_success '--log=3 limits shortlog length' '
236
237
test_expect_success '--log=5 shows all 5 commits' '
238
cat >expected <<-EOF &&
239
- Merge branch ${apos}left${apos}
239
+ Merge branch ${apos}left${apos} into master
240
241
# By Another Author (3) and A U Thor (2)
242
# Via Another Committer
@@ -253,13 +253,13 @@ test_expect_success '--log=5 shows all 5 commits' '
253
'
254
255
test_expect_success '--no-log disables shortlog' '
256
- echo "Merge branch ${apos}left${apos}" >expected &&
256
+ echo "Merge branch ${apos}left${apos} into master" >expected &&
257
git fmt-merge-msg --no-log <.git/FETCH_HEAD >actual &&
258
test_cmp expected actual
259
'
260
261
test_expect_success '--log=0 disables shortlog' '
262
- echo "Merge branch ${apos}left${apos}" >expected &&
262
+ echo "Merge branch ${apos}left${apos} into master" >expected &&
263
git fmt-merge-msg --no-log <.git/FETCH_HEAD >actual &&
264
test_cmp expected actual
265
'
@@ -300,7 +300,7 @@ test_expect_success 'fmt-merge-msg -m' '
300
301
test_expect_success 'setup: expected shortlog for two branches' '
302
cat >expected <<-EOF
303
- Merge branches ${apos}left${apos} and ${apos}right${apos}
303
+ Merge branches ${apos}left${apos} and ${apos}right${apos} into master
304
305
# By Another Author (3) and A U Thor (2)
306
# Via Another Committer
@@ -397,7 +397,7 @@ test_expect_success 'merge-msg with nothing to merge' '
397
398
test_expect_success 'merge-msg tag' '
399
cat >expected <<-EOF &&
400
- Merge tag ${apos}tag-r3${apos}
400
+ Merge tag ${apos}tag-r3${apos} into master
401
402
* tag ${apos}tag-r3${apos}:
403
Right #3
@@ -418,7 +418,7 @@ test_expect_success 'merge-msg tag' '
418
419
test_expect_success 'merge-msg two tags' '
420
cat >expected <<-EOF &&
421
- Merge tags ${apos}tag-r3${apos} and ${apos}tag-l5${apos}
421
+ Merge tags ${apos}tag-r3${apos} and ${apos}tag-l5${apos} into master
422
423
* tag ${apos}tag-r3${apos}:
424
Right #3
@@ -448,7 +448,7 @@ test_expect_success 'merge-msg two tags' '
448
449
test_expect_success 'merge-msg tag and branch' '
450
cat >expected <<-EOF &&
451
- Merge branch ${apos}left${apos}, tag ${apos}tag-r3${apos}
451
+ Merge branch ${apos}left${apos}, tag ${apos}tag-r3${apos} into master
452
453
* tag ${apos}tag-r3${apos}:
454
Right #3
@@ -479,7 +479,7 @@ test_expect_success 'merge-msg tag and branch' '
479
test_expect_success 'merge-msg lots of commits' '
480
{
481
cat <<-EOF &&
482
- Merge branch ${apos}long${apos}
482
+ Merge branch ${apos}long${apos} into master
483
484
* long: (35 commits)
485
EOF
@@ -516,7 +516,7 @@ test_expect_success 'merge-msg with "merging" an annotated tag' '
516
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
517
{
518
cat <<-\EOF
519
- Merge tag '\''annote'\''
519
+ Merge tag '\''annote'\'' into master
520
521
An annotated one
522
@@ -531,7 +531,7 @@ test_expect_success 'merge-msg with "merging" an annotated tag' '
531
git merge --no-commit --no-ff $annote &&
532
{
533
cat <<-EOF
534
- Merge tag '\''$annote'\''
534
+ Merge tag '\''$annote'\'' into master
535
536
An annotated one
537
t/t7600-merge.sh
+7
-7
@@ -14,9 +14,9 @@ Testing basic merge operations/option parsing.
14
! [c4] c4
15
! [c5] c5
16
! [c6] c6
17
- * [master] Merge commit 'c1'
17
+ * [master] Merge commit 'c1' into master
18
--------
19
- - [master] Merge commit 'c1'
19
+ - [master] Merge commit 'c1' into master
20
+ * [c1] commit 1
21
+ [c6] c6
22
+ [c5] c5
@@ -44,8 +44,8 @@ test_write_lines '1 X' 2 '3 X' 4 '5 X' 6 7 8 '9 X' >result.1-3-5-9
44
test_write_lines 1 2 3 4 5 6 7 8 '9 Z' >result.9z
45
46
create_merge_msgs () {
47
- echo "Merge tag 'c2'" >msg.1-5 &&
48
- echo "Merge tags 'c2' and 'c3'" >msg.1-5-9 &&
47
+ echo "Merge tag 'c2' into master" >msg.1-5 &&
48
+ echo "Merge tags 'c2' and 'c3' into master" >msg.1-5-9 &&
49
{
50
echo "Squashed commit of the following:" &&
51
echo &&
@@ -258,7 +258,7 @@ test_expect_success 'merge c3 with c7 with commit.cleanup = scissors' '
258
git commit --no-edit -a &&
259
260
cat >expect <<-\EOF &&
261
- Merge tag '"'"'c7'"'"'
261
+ Merge tag '"'"'c7'"'"' into master
262
263
# ------------------------ >8 ------------------------
264
# Do not modify or remove the line above.
@@ -808,10 +808,10 @@ test_expect_success 'merge with conflicted --autostash changes' '
808
'
809
810
cat >expected.branch <<\EOF
811
-Merge branch 'c5-branch' (early part)
811
+Merge branch 'c5-branch' (early part) into master
812
EOF
813
cat >expected.tag <<\EOF
814
-Merge commit 'c5~1'
814
+Merge commit 'c5~1' into master
815
EOF
816
817
test_expect_success 'merge early part of c2' '
t/t7608-merge-messages.sh
+5
-5
@@ -16,7 +16,7 @@ test_expect_success 'merge local branch' '
16
git checkout master &&
17
test_commit master-2 &&
18
git merge local-branch &&
19
- check_oneline "Merge branch Qlocal-branchQ"
19
+ check_oneline "Merge branch Qlocal-branchQ into master"
20
'
21
22
test_expect_success 'merge octopus branches' '
@@ -26,7 +26,7 @@ test_expect_success 'merge octopus branches' '
26
test_commit octopus-2 &&
27
git checkout master &&
28
git merge octopus-a octopus-b &&
29
- check_oneline "Merge branches Qoctopus-aQ and Qoctopus-bQ"
29
+ check_oneline "Merge branches Qoctopus-aQ and Qoctopus-bQ into master"
30
'
31
32
test_expect_success 'merge tag' '
@@ -35,7 +35,7 @@ test_expect_success 'merge tag' '
35
git checkout master &&
36
test_commit master-3 &&
37
git merge tag-1 &&
38
- check_oneline "Merge tag Qtag-1Q"
38
+ check_oneline "Merge tag Qtag-1Q into master"
39
'
40
41
test_expect_success 'ambiguous tag' '
@@ -44,7 +44,7 @@ test_expect_success 'ambiguous tag' '
44
git checkout master &&
45
test_commit master-4 &&
46
git merge ambiguous &&
47
- check_oneline "Merge tag QambiguousQ"
47
+ check_oneline "Merge tag QambiguousQ into master"
48
'
49
50
test_expect_success 'remote-tracking branch' '
@@ -54,7 +54,7 @@ test_expect_success 'remote-tracking branch' '
54
git checkout master &&
55
test_commit master-5 &&
56
git merge origin/master &&
57
- check_oneline "Merge remote-tracking branch Qorigin/masterQ"
57
+ check_oneline "Merge remote-tracking branch Qorigin/masterQ into master"
58
'
59
60
test_done