From 9927ebed1966be260afb3579781d5b4a9ee4a029 Mon Sep 17 00:00:00 2001 From: Ralf Thielow Date: Sun, 7 Apr 2013 17:25:43 +0200 Subject: fmt-merge-msg: respect core.commentchar in people credits Commit eff80a9 (Allow custom "comment char") introduced a custom comment character for commit messages but forgot to use it in people credits which can be a part of a commit message. With this commit, the custom comment character is also used in people credits. Signed-off-by: Ralf Thielow Signed-off-by: Junio C Hamano --- t/t6200-fmt-merge-msg.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 't') diff --git a/t/t6200-fmt-merge-msg.sh b/t/t6200-fmt-merge-msg.sh index 992c2a0467..84e10fde6f 100755 --- a/t/t6200-fmt-merge-msg.sh +++ b/t/t6200-fmt-merge-msg.sh @@ -180,6 +180,24 @@ test_expect_success 'merge.log=5 shows all 5 commits' ' test_cmp expected actual ' +test_expect_success '--log=5 with custom comment character' ' + cat >expected <<-EOF && + Merge branch ${apos}left${apos} + + / By Another Author (3) and A U Thor (2) + / Via Another Committer + * left: + Left #5 + Left #4 + Left #3 + Common #2 + Common #1 + EOF + + git -c core.commentchar="/" fmt-merge-msg --log=5 <.git/FETCH_HEAD >actual && + test_cmp expected actual +' + test_expect_success 'merge.log=0 disables shortlog' ' echo "Merge branch ${apos}left${apos}" >expected git -c merge.log=0 fmt-merge-msg <.git/FETCH_HEAD >actual && -- cgit v1.2.3 From 16a794de889ecc11ccbcd5ecf998a128d6dbfa97 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Thu, 18 Apr 2013 08:42:25 +0200 Subject: t6200: avoid path mangling issue on Windows MSYS bash interprets the slash in the argument core.commentchar="/" as root directory and mangles it into a Windows style path. Use a different core.commentchar to dodge the issue. Signed-off-by: Johannes Sixt Signed-off-by: Junio C Hamano --- t/t6200-fmt-merge-msg.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 't') diff --git a/t/t6200-fmt-merge-msg.sh b/t/t6200-fmt-merge-msg.sh index 84e10fde6f..ff82640aee 100755 --- a/t/t6200-fmt-merge-msg.sh +++ b/t/t6200-fmt-merge-msg.sh @@ -184,8 +184,8 @@ test_expect_success '--log=5 with custom comment character' ' cat >expected <<-EOF && Merge branch ${apos}left${apos} - / By Another Author (3) and A U Thor (2) - / Via Another Committer + x By Another Author (3) and A U Thor (2) + x Via Another Committer * left: Left #5 Left #4 @@ -194,7 +194,7 @@ test_expect_success '--log=5 with custom comment character' ' Common #1 EOF - git -c core.commentchar="/" fmt-merge-msg --log=5 <.git/FETCH_HEAD >actual && + git -c core.commentchar="x" fmt-merge-msg --log=5 <.git/FETCH_HEAD >actual && test_cmp expected actual ' -- cgit v1.2.3