From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>, Jonathan Nieder <jrnieder@gmail.com>
Subject: [PATCH 1/2] t6200-fmt-merge-msg: Exercise 'merge.log' to configure shortlog length
Date: Fri, 27 Aug 2010 19:44:49 +0530 [thread overview]
Message-ID: <1282918490-5190-2-git-send-email-artagnon@gmail.com> (raw)
In-Reply-To: <1282918490-5190-1-git-send-email-artagnon@gmail.com>
Add a test to exercise the 'merge.log' configuration 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>
---
t/t6200-fmt-merge-msg.sh | 55 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 55 insertions(+), 0 deletions(-)
diff --git a/t/t6200-fmt-merge-msg.sh b/t/t6200-fmt-merge-msg.sh
index 71f6cad..750568e 100755
--- a/t/t6200-fmt-merge-msg.sh
+++ b/t/t6200-fmt-merge-msg.sh
@@ -129,6 +129,61 @@ test_expect_success '[merge] summary/log configuration' '
test_cmp expected actual2
'
+test_expect_success 'configurable shortlog length: merge.log' '
+ cat >expected_a <<-EOF &&
+ Merge branch ${apos}left${apos}
+
+ * left: (5 commits)
+ Left #5
+ Left #4
+ Left #3
+ ...
+ EOF
+
+ git config merge.log 3 &&
+ test_might_fail git config --unset-all merge.summary &&
+
+ git checkout master &&
+ test_tick &&
+ git fetch . left &&
+
+ git fmt-merge-msg <.git/FETCH_HEAD >actual1 &&
+
+ test_might_fail git config --unset-all merge.log &&
+ git config merge.summary 3 &&
+
+ git checkout master &&
+ test_tick &&
+ git fetch . left &&
+
+ git fmt-merge-msg <.git/FETCH_HEAD >actual2 &&
+
+ echo "Merge branch ${apos}left${apos}" >expected_b &&
+
+ git config merge.log 0 &&
+ test_might_fail git config --unset-all merge.summary &&
+
+ git checkout master &&
+ test_tick &&
+ git fetch . left &&
+
+ git fmt-merge-msg <.git/FETCH_HEAD >actual3 &&
+
+ test_might_fail git config --unset-all merge.log &&
+ test_might_fail git config --unset-all merge.summary &&
+
+ git checkout master &&
+ test_tick &&
+ git fetch . left &&
+
+ git fmt-merge-msg <.git/FETCH_HEAD >actual4 &&
+
+ test_cmp expected_a actual1 &&
+ test_cmp expected_a actual2 &&
+ test_cmp expected_b actual3 &&
+ test_cmp expected_b actual4
+'
+
test_expect_success 'fmt-merge-msg -m' '
echo "Sync with left" >expected &&
cat >expected.log <<-EOF &&
--
1.7.2.2.409.gdbb11.dirty
next prev parent reply other threads:[~2010-08-27 14:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-27 14:14 [PATCH 0/2] Two tests for rr/fmt-merge-msg Ramkumar Ramachandra
2010-08-27 14:14 ` Ramkumar Ramachandra [this message]
2010-08-28 2:00 ` [PATCH 1/2] t6200-fmt-merge-msg: Exercise 'merge.log' to configure shortlog length Jonathan Nieder
2010-08-28 2:05 ` Jonathan Nieder
2010-08-28 10:35 ` Ramkumar Ramachandra
2010-08-28 17:09 ` Jonathan Nieder
2010-08-27 14:14 ` [PATCH 2/2] t6200-fmt-merge-msg: Exercise '--log' " Ramkumar Ramachandra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1282918490-5190-2-git-send-email-artagnon@gmail.com \
--to=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).