Skip to content

Commit

Permalink
fmt-merge-msg: make attribution into comment lines
Browse files Browse the repository at this point in the history
The submaintainer credit is not something you can compute purely by
looking at the history and its shape, especially in the presense of
fast-forward merges, and this observation makes the information on
the "via" line unreliable.  Let's leave the final determination of
credits up to whoever is making the merge and show them as comments.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Jun 6, 2012
1 parent 418a143 commit 9830a9c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions builtin/fmt-merge-msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,10 @@ static void credit_people(struct strbuf *out,
const char *me;

if (kind == 'a') {
label = "\nBy ";
label = "\n# By ";
me = git_author_info(IDENT_NO_DATE);
} else {
label = "\nvia ";
label = "\n# Via ";
me = git_committer_info(IDENT_NO_DATE);
}

Expand Down
36 changes: 18 additions & 18 deletions t/t6200-fmt-merge-msg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ test_expect_success '[merge] summary/log configuration' '
cat >expected <<-EOF &&
Merge branch ${apos}left${apos}
By Another Author (3) and A U Thor (2)
via Another Committer
# By Another Author (3) and A U Thor (2)
# Via Another Committer
* left:
Left #5
Left #4
Expand Down Expand Up @@ -149,8 +149,8 @@ test_expect_success 'merge.log=3 limits shortlog length' '
cat >expected <<-EOF &&
Merge branch ${apos}left${apos}
By Another Author (3) and A U Thor (2)
via Another Committer
# By Another Author (3) and A U Thor (2)
# Via Another Committer
* left: (5 commits)
Left #5
Left #4
Expand All @@ -166,8 +166,8 @@ test_expect_success 'merge.log=5 shows all 5 commits' '
cat >expected <<-EOF &&
Merge branch ${apos}left${apos}
By Another Author (3) and A U Thor (2)
via Another Committer
# By Another Author (3) and A U Thor (2)
# Via Another Committer
* left:
Left #5
Left #4
Expand All @@ -190,8 +190,8 @@ test_expect_success '--log=3 limits shortlog length' '
cat >expected <<-EOF &&
Merge branch ${apos}left${apos}
By Another Author (3) and A U Thor (2)
via Another Committer
# By Another Author (3) and A U Thor (2)
# Via Another Committer
* left: (5 commits)
Left #5
Left #4
Expand All @@ -207,8 +207,8 @@ test_expect_success '--log=5 shows all 5 commits' '
cat >expected <<-EOF &&
Merge branch ${apos}left${apos}
By Another Author (3) and A U Thor (2)
via Another Committer
# By Another Author (3) and A U Thor (2)
# Via Another Committer
* left:
Left #5
Left #4
Expand Down Expand Up @@ -238,8 +238,8 @@ test_expect_success 'fmt-merge-msg -m' '
cat >expected.log <<-EOF &&
Sync with left
By Another Author (3) and A U Thor (2)
via Another Committer
# By Another Author (3) and A U Thor (2)
# Via Another Committer
* ${apos}left${apos} of $(pwd):
Left #5
Left #4
Expand Down Expand Up @@ -271,8 +271,8 @@ test_expect_success 'setup: expected shortlog for two branches' '
cat >expected <<-EOF
Merge branches ${apos}left${apos} and ${apos}right${apos}
By Another Author (3) and A U Thor (2)
via Another Committer
# By Another Author (3) and A U Thor (2)
# Via Another Committer
* left:
Left #5
Left #4
Expand Down Expand Up @@ -396,8 +396,8 @@ test_expect_success 'merge-msg two tags' '
Common #2
Common #1
By Another Author (3) and A U Thor (2)
via Another Committer
# By Another Author (3) and A U Thor (2)
# Via Another Committer
* tag ${apos}tag-l5${apos}:
Left #5
Left #4
Expand Down Expand Up @@ -426,8 +426,8 @@ test_expect_success 'merge-msg tag and branch' '
Common #2
Common #1
By Another Author (3) and A U Thor (2)
via Another Committer
# By Another Author (3) and A U Thor (2)
# Via Another Committer
* left:
Left #5
Left #4
Expand Down

0 comments on commit 9830a9c

Please sign in to comment.