Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit d844808

Browse files
committed
Merge branch 'jc/fmt-merge-msg-people'
Tone down the lines that credit people involved and make them comments, so that integrators who edit their merge messages can still make use of the information, but lazy ones will not leave the unverified guesses placed on the "via" line. * jc/fmt-merge-msg-people: fmt-merge-msg: make attribution into comment lines
2 parents 8772575 + 9830a9c commit d844808

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

builtin/fmt-merge-msg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,10 @@ static void credit_people(struct strbuf *out,
286286
const char *me;
287287

288288
if (kind == 'a') {
289-
label = "\nBy ";
289+
label = "\n# By ";
290290
me = git_author_info(IDENT_NO_DATE);
291291
} else {
292-
label = "\nvia ";
292+
label = "\n# Via ";
293293
me = git_committer_info(IDENT_NO_DATE);
294294
}
295295

t/t6200-fmt-merge-msg.sh

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ test_expect_success '[merge] summary/log configuration' '
102102
cat >expected <<-EOF &&
103103
Merge branch ${apos}left${apos}
104104
105-
By Another Author (3) and A U Thor (2)
106-
via Another Committer
105+
# By Another Author (3) and A U Thor (2)
106+
# Via Another Committer
107107
* left:
108108
Left #5
109109
Left #4
@@ -149,8 +149,8 @@ test_expect_success 'merge.log=3 limits shortlog length' '
149149
cat >expected <<-EOF &&
150150
Merge branch ${apos}left${apos}
151151
152-
By Another Author (3) and A U Thor (2)
153-
via Another Committer
152+
# By Another Author (3) and A U Thor (2)
153+
# Via Another Committer
154154
* left: (5 commits)
155155
Left #5
156156
Left #4
@@ -166,8 +166,8 @@ test_expect_success 'merge.log=5 shows all 5 commits' '
166166
cat >expected <<-EOF &&
167167
Merge branch ${apos}left${apos}
168168
169-
By Another Author (3) and A U Thor (2)
170-
via Another Committer
169+
# By Another Author (3) and A U Thor (2)
170+
# Via Another Committer
171171
* left:
172172
Left #5
173173
Left #4
@@ -190,8 +190,8 @@ test_expect_success '--log=3 limits shortlog length' '
190190
cat >expected <<-EOF &&
191191
Merge branch ${apos}left${apos}
192192
193-
By Another Author (3) and A U Thor (2)
194-
via Another Committer
193+
# By Another Author (3) and A U Thor (2)
194+
# Via Another Committer
195195
* left: (5 commits)
196196
Left #5
197197
Left #4
@@ -207,8 +207,8 @@ test_expect_success '--log=5 shows all 5 commits' '
207207
cat >expected <<-EOF &&
208208
Merge branch ${apos}left${apos}
209209
210-
By Another Author (3) and A U Thor (2)
211-
via Another Committer
210+
# By Another Author (3) and A U Thor (2)
211+
# Via Another Committer
212212
* left:
213213
Left #5
214214
Left #4
@@ -238,8 +238,8 @@ test_expect_success 'fmt-merge-msg -m' '
238238
cat >expected.log <<-EOF &&
239239
Sync with left
240240
241-
By Another Author (3) and A U Thor (2)
242-
via Another Committer
241+
# By Another Author (3) and A U Thor (2)
242+
# Via Another Committer
243243
* ${apos}left${apos} of $(pwd):
244244
Left #5
245245
Left #4
@@ -271,8 +271,8 @@ test_expect_success 'setup: expected shortlog for two branches' '
271271
cat >expected <<-EOF
272272
Merge branches ${apos}left${apos} and ${apos}right${apos}
273273
274-
By Another Author (3) and A U Thor (2)
275-
via Another Committer
274+
# By Another Author (3) and A U Thor (2)
275+
# Via Another Committer
276276
* left:
277277
Left #5
278278
Left #4
@@ -396,8 +396,8 @@ test_expect_success 'merge-msg two tags' '
396396
Common #2
397397
Common #1
398398
399-
By Another Author (3) and A U Thor (2)
400-
via Another Committer
399+
# By Another Author (3) and A U Thor (2)
400+
# Via Another Committer
401401
* tag ${apos}tag-l5${apos}:
402402
Left #5
403403
Left #4
@@ -426,8 +426,8 @@ test_expect_success 'merge-msg tag and branch' '
426426
Common #2
427427
Common #1
428428
429-
By Another Author (3) and A U Thor (2)
430-
via Another Committer
429+
# By Another Author (3) and A U Thor (2)
430+
# Via Another Committer
431431
* left:
432432
Left #5
433433
Left #4

0 commit comments

Comments
 (0)