diff options
author | Ramkumar Ramachandra <artagnon@gmail.com> | 2010-09-08 23:29:57 +0530 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-09-09 11:39:26 -0700 |
commit | bd2549ca6b0b2d897e073bbaa34c1fee46acd8f0 (patch) | |
tree | 149cbd2b6008e16d7b1309f6cb7336f190e55b72 /t/t6200-fmt-merge-msg.sh | |
parent | b928cbf120a8f6d1d435849fb1fcf1c64489dc4c (diff) | |
download | git-bd2549ca6b0b2d897e073bbaa34c1fee46acd8f0.tar.gz |
t6200-fmt-merge-msg: Exercise '--log' to configure shortlog length
Add a test to exercise the '--log' command-line option of 'git
fmt-merge-msg'. It controls the number of shortlog entries to display
in merge commit messages.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Thanks-to: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6200-fmt-merge-msg.sh')
-rwxr-xr-x | t/t6200-fmt-merge-msg.sh | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/t/t6200-fmt-merge-msg.sh b/t/t6200-fmt-merge-msg.sh index 9b600a8717..9a16806921 100755 --- a/t/t6200-fmt-merge-msg.sh +++ b/t/t6200-fmt-merge-msg.sh @@ -177,6 +177,49 @@ test_expect_success 'merge.log=0 disables shortlog' ' test_cmp expected actual ' +test_expect_success '--log=3 limits shortlog length' ' + cat >expected <<-EOF && + Merge branch ${apos}left${apos} + + * left: (5 commits) + Left #5 + Left #4 + Left #3 + ... + EOF + + git fmt-merge-msg --log=3 <.git/FETCH_HEAD >actual && + test_cmp expected actual +' + +test_expect_success '--log=5 shows all 5 commits' ' + cat >expected <<-EOF && + Merge branch ${apos}left${apos} + + * left: + Left #5 + Left #4 + Left #3 + Common #2 + Common #1 + EOF + + git fmt-merge-msg --log=5 <.git/FETCH_HEAD >actual && + test_cmp expected actual +' + +test_expect_success '--no-log disables shortlog' ' + echo "Merge branch ${apos}left${apos}" >expected && + git fmt-merge-msg --no-log <.git/FETCH_HEAD >actual && + test_cmp expected actual +' + +test_expect_success '--log=0 disables shortlog' ' + echo "Merge branch ${apos}left${apos}" >expected && + git fmt-merge-msg --no-log <.git/FETCH_HEAD >actual && + test_cmp expected actual +' + test_expect_success 'fmt-merge-msg -m' ' echo "Sync with left" >expected && cat >expected.log <<-EOF && |