{"thread":{"id":"24887","subject":"[PATCH 0/2] Two tests for rr/fmt-merge-msg","startedAt":"2010-08-27T14:14:48Z","lastAt":"2010-08-28T17:09:26Z","messageCount":7,"participants":["Ramkumar Ramachandra","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"149120","messageId":"1282918490-5190-1-git-send-email-artagnon@gmail.com","threadId":"24887","inReplyTo":null,"subject":"[PATCH 0/2] Two tests for rr/fmt-merge-msg","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2010-08-27T14:14:48Z","receivedAt":"2010-08-27T14:14:48Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"These tests exercise the feature in rr/fmt-merge-msg.\n\nRamkumar Ramachandra (2):\n  t6200-fmt-merge-msg: Exercise 'merge.log' to configure shortlog\n    length\n  t6200-fmt-merge-msg: Exercise '--log' to configure shortlog length\n\n t/t6200-fmt-merge-msg.sh |  111 ++++++++++++++++++++++++++++++++++++++++++++++\n 1 files changed, 111 insertions(+), 0 deletions(-)\n\n-- \n1.7.2.2.409.gdbb11.dirty\n"},{"id":"149121","messageId":"1282918490-5190-2-git-send-email-artagnon@gmail.com","threadId":"24887","inReplyTo":"1282918490-5190-1-git-send-email-artagnon@gmail.com","subject":"[PATCH 1/2] t6200-fmt-merge-msg: Exercise 'merge.log' to configure shortlog length","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2010-08-27T14:14:49Z","receivedAt":"2010-08-27T14:14:49Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Add a test to exercise the 'merge.log' configuration option of 'git\nfmt-merge-msg'. It controls the number of shortlog entries to display\nin merge commit messages.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n t/t6200-fmt-merge-msg.sh |   55 ++++++++++++++++++++++++++++++++++++++++++++++\n 1 files changed, 55 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t6200-fmt-merge-msg.sh b/t/t6200-fmt-merge-msg.sh\nindex 71f6cad..750568e 100755\n--- a/t/t6200-fmt-merge-msg.sh\n+++ b/t/t6200-fmt-merge-msg.sh\n@@ -129,6 +129,61 @@ test_expect_success '[merge] summary/log configuration' '\n \ttest_cmp expected actual2\n '\n \n+test_expect_success 'configurable shortlog length: merge.log' '\n+\tcat >expected_a <<-EOF &&\n+\tMerge branch ${apos}left${apos}\n+\n+\t* left: (5 commits)\n+\t  Left #5\n+\t  Left #4\n+\t  Left #3\n+\t  ...\n+\tEOF\n+\n+\tgit config merge.log 3 &&\n+\ttest_might_fail git config --unset-all merge.summary &&\n+\n+\tgit checkout master &&\n+\ttest_tick &&\n+\tgit fetch . left &&\n+\n+\tgit fmt-merge-msg <.git/FETCH_HEAD >actual1 &&\n+\n+\ttest_might_fail git config --unset-all merge.log &&\n+\tgit config merge.summary 3 &&\n+\n+\tgit checkout master &&\n+\ttest_tick &&\n+\tgit fetch . left &&\n+\n+\tgit fmt-merge-msg <.git/FETCH_HEAD >actual2 &&\n+\n+\techo \"Merge branch ${apos}left${apos}\" >expected_b &&\n+\n+\tgit config merge.log 0 &&\n+\ttest_might_fail git config --unset-all merge.summary &&\n+\n+\tgit checkout master &&\n+\ttest_tick &&\n+\tgit fetch . left &&\n+\n+\tgit fmt-merge-msg <.git/FETCH_HEAD >actual3 &&\n+\n+\ttest_might_fail git config --unset-all merge.log &&\n+\ttest_might_fail git config --unset-all merge.summary &&\n+\n+\tgit checkout master &&\n+\ttest_tick &&\n+\tgit fetch . left &&\n+\n+\tgit fmt-merge-msg <.git/FETCH_HEAD >actual4 &&\n+\n+\ttest_cmp expected_a actual1 &&\n+\ttest_cmp expected_a actual2 &&\n+\ttest_cmp expected_b actual3 &&\n+\ttest_cmp expected_b actual4\n+'\n+\n test_expect_success 'fmt-merge-msg -m' '\n \techo \"Sync with left\" >expected &&\n \tcat >expected.log <<-EOF &&\n-- \n1.7.2.2.409.gdbb11.dirty\n"},{"id":"149122","messageId":"1282918490-5190-3-git-send-email-artagnon@gmail.com","threadId":"24887","inReplyTo":"1282918490-5190-1-git-send-email-artagnon@gmail.com","subject":"[PATCH 2/2] t6200-fmt-merge-msg: Exercise '--log' to configure shortlog length","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2010-08-27T14:14:50Z","receivedAt":"2010-08-27T14:14:50Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Add a test to exercise the '--log' command-line option of 'git\nfmt-merge-msg'. It controls the number of shortlog entries to display\nin merge commit messages.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n t/t6200-fmt-merge-msg.sh |   56 ++++++++++++++++++++++++++++++++++++++++++++++\n 1 files changed, 56 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t6200-fmt-merge-msg.sh b/t/t6200-fmt-merge-msg.sh\nindex 750568e..b308c3b 100755\n--- a/t/t6200-fmt-merge-msg.sh\n+++ b/t/t6200-fmt-merge-msg.sh\n@@ -184,6 +184,62 @@ test_expect_success 'configurable shortlog length: merge.log' '\n \ttest_cmp expected_b actual4\n '\n \n+test_expect_success 'configurable shortlog length: --log' '\n+\tcat >expected1 <<-EOF &&\n+\tMerge branch ${apos}left${apos}\n+\n+\t* left: (5 commits)\n+\t  Left #5\n+\t  Left #4\n+\t  Left #3\n+\t  ...\n+\tEOF\n+\n+\ttest_might_fail git config --unset-all merge.log &&\n+\ttest_might_fail git config --unset-all merge.summary &&\n+\n+\tgit checkout master &&\n+\ttest_tick &&\n+\tgit fetch . left &&\n+\n+\tgit fmt-merge-msg --log=3 <.git/FETCH_HEAD >actual1 &&\n+\n+\tcat >expected_b <<-EOF &&\n+\tMerge branch ${apos}left${apos}\n+\n+\t* left:\n+\t  Left #5\n+\t  Left #4\n+\t  Left #3\n+\t  Common #2\n+\t  Common #1\n+\tEOF\n+\n+\ttest_might_fail git config --unset-all merge.log &&\n+\ttest_might_fail git config --unset-all merge.summary &&\n+\n+\tgit checkout master &&\n+\ttest_tick &&\n+\tgit fetch . left &&\n+\n+\tgit fmt-merge-msg --log <.git/FETCH_HEAD >actual2 &&\n+\n+\techo \"Merge branch ${apos}left${apos}\" >expected_c &&\n+\n+\ttest_might_fail git config --unset-all merge.log &&\n+\ttest_might_fail git config --unset-all merge.summary &&\n+\n+\tgit checkout master &&\n+\ttest_tick &&\n+\tgit fetch . left &&\n+\n+\tgit fmt-merge-msg --no-log <.git/FETCH_HEAD >actual3 &&\n+\n+\ttest_cmp expected_a actual1 &&\n+\ttest_cmp expected_b actual2 &&\n+\ttest_cmp expected_c actual3\n+'\n+\n test_expect_success 'fmt-merge-msg -m' '\n \techo \"Sync with left\" >expected &&\n \tcat >expected.log <<-EOF &&\n-- \n1.7.2.2.409.gdbb11.dirty\n"},{"id":"149150","messageId":"20100828020018.GD2004@burratino","threadId":"24887","inReplyTo":"1282918490-5190-2-git-send-email-artagnon@gmail.com","subject":"Re: [PATCH 1/2] t6200-fmt-merge-msg: Exercise 'merge.log' to configure shortlog length","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-08-28T02:00:18Z","receivedAt":"2010-08-28T02:00:18Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nRamkumar Ramachandra wrote:\n\n> Add a test to exercise the 'merge.log' configuration option\n\nThanks!\n\n> +test_expect_success 'configurable shortlog length: merge.log' '\n\nI suspect this test would be easier to understand if split up (yes, I\nknow I'm guilty of the same in other tests from this file).\n\nMaybe something like this?\n\n\ttest_expect_success 'setup: clear [merge] configuration' '\n\t\ttest_might_fail git config --unset-all merge.log &&\n\t\ttest_might_fail git config --unset-all merge.summary\n\t'\n\n\ttest_expect_success 'set up FETCH_HEAD' '\n\t\tgit checkout master &&\n\t\tgit fetch . left\n\t'\n\n\ttest_expect_success 'merge.log=3 limits shortlog length' '\n\t\ttest_might_fail git config --unset merge.log &&\n\t\ttest_might_fail git config --unset merge.summary &&\n\n\t\tcat >expected <<-\\EOF &&\n\t\t  Left #3\n\t\t  ...\n\t\tEOF\n\t\tgit -c merge.log=3 fmt-merge-msg <.git/FETCH_HEAD >msg &&\n\n\t\ttail -n 2 msg >actual &&\n\t\ttest_cmp expected actual\n\t'\n\n\ttest_expect_success 'shortlog length defaults to 20' '\n\t\t[...]\n\t'\n\n\ttest_expect_success 'merge.log=5 does not limit shortlog length' '\n\t\t[...]\n\t'\n\n\ttest_expect_success 'merge.log=6 does not limit shortlog length' '\n\t\t[...]\n\t'\n\n\ttest_expect_success 'merge.log=0 disables shortlog' '\n\t\t[...]\n\t'\n\n\ttest_expect_success 'merge.log=-1 does something sane' '\n\t\t[...]\n\t'\n\nI can clean up the earlier tests afterwards. :)\nJonathan\n"},{"id":"149152","messageId":"20100828020512.GE2004@burratino","threadId":"24887","inReplyTo":"20100828020018.GD2004@burratino","subject":"Re: [PATCH 1/2] t6200-fmt-merge-msg: Exercise 'merge.log' to configure shortlog length","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-08-28T02:05:12Z","receivedAt":"2010-08-28T02:05:12Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Jonathan Nieder wrote:\n\n> Maybe something like this?\n> \n> \ttest_expect_success 'setup: clear [merge] configuration' '\n> \t\ttest_might_fail git config --unset-all merge.log &&\n> \t\ttest_might_fail git config --unset-all merge.summary\n> \t'\n> \n> \ttest_expect_success 'set up FETCH_HEAD' '\n> \t\tgit checkout master &&\n> \t\tgit fetch . left\n> \t'\n> \n> \ttest_expect_success 'merge.log=3 limits shortlog length' '\n> \t\ttest_might_fail git config --unset merge.log &&\n> \t\ttest_might_fail git config --unset merge.summary &&\n\nErm, these two lines wouldn't be necessary given the earlier setup,\nof course.\n> \n> \t\tcat >expected <<-\\EOF &&\n> \t\t  Left #3\n> \t\t  ...\n> \t\tEOF\n> \t\tgit -c merge.log=3 fmt-merge-msg <.git/FETCH_HEAD >msg &&\n> \n> \t\ttail -n 2 msg >actual &&\n> \t\ttest_cmp expected actual\n> \t'\n\nSorry for the noise.\n\n*goes off to sleep*\n"},{"id":"149157","messageId":"20100828103536.GA12205@kytes","threadId":"24887","inReplyTo":"20100828020018.GD2004@burratino","subject":"Re: [PATCH 1/2] t6200-fmt-merge-msg: Exercise 'merge.log' to configure shortlog length","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2010-08-28T10:35:39Z","receivedAt":"2010-08-28T10:35:39Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi Jonathan,\n\nJonathan Nieder writes:\n> I suspect this test would be easier to understand if split up (yes, I\n> know I'm guilty of the same in other tests from this file).\n\nI sort of tried to follow what was done in the rest of the file. If\nthis style is desired instead, I'll post an alternative series\ninstead.\n\n> \ttest_expect_success 'setup: clear [merge] configuration' '\n> \t\ttest_might_fail git config --unset-all merge.log &&\n> \t\ttest_might_fail git config --unset-all merge.summary\n> \t'\n> \n> \ttest_expect_success 'set up FETCH_HEAD' '\n> \t\tgit checkout master &&\n> \t\tgit fetch . left\n> \t'\n\nOkay.\n\n> \ttest_expect_success 'merge.log=3 limits shortlog length' '\n> \t\ttest_might_fail git config --unset merge.log &&\n> \t\ttest_might_fail git config --unset merge.summary &&\n\nRedundant, as you pointed out in another email.\n\n> \t\tcat >expected <<-\\EOF &&\n> \t\t  Left #3\n> \t\t  ...\n> \t\tEOF\n> \t\tgit -c merge.log=3 fmt-merge-msg <.git/FETCH_HEAD >msg &&\n> \n> \t\ttail -n 2 msg >actual &&\n> \t\ttest_cmp expected actual\n> \t'\n\nOk. I don't like the `tail` thing. Why are you doing it instead of\ncomparing full outputs like the tests in the rest of the file?\n\n> \ttest_expect_success 'shortlog length defaults to 20' '\n> \t\t[...]\n> \t'\n\nActually, we can't test this unless we actually create a branch with\n20 commits and merge it. I've dropped this- you might like to add it\nduring the cleanup.\n\n> \ttest_expect_success 'merge.log=5 does not limit shortlog length' '\n> \t\t[...]\n> \t'\n\nOkay.\n\n> \ttest_expect_success 'merge.log=6 does not limit shortlog length' '\n> \t\t[...]\n> \t'\n\nI thought this was a bit of an overkill, so I removed it.\n\n> \ttest_expect_success 'merge.log=0 disables shortlog' '\n> \t\t[...]\n> \t'\n\nOkay.\n\n> \ttest_expect_success 'merge.log=-1 does something sane' '\n> \t\t[...]\n> \t'\n\nThanks! I found a bug and fixed it (patch will come in a moment).\n\n> I can clean up the earlier tests afterwards. :)\n\nOkay, sounds good.\n\n-- Ram\n"},{"id":"149168","messageId":"20100828170926.GA1945@burratino","threadId":"24887","inReplyTo":"20100828103536.GA12205@kytes","subject":"Re: [PATCH 1/2] t6200-fmt-merge-msg: Exercise 'merge.log' to configure shortlog length","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-08-28T17:09:26Z","receivedAt":"2010-08-28T17:09:26Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ramkumar Ramachandra wrote:\n> Jonathan Nieder writes:\n\n>> \t\tcat >expected <<-\\EOF &&\n>> \t\t  Left #3\n>> \t\t  ...\n>> \t\tEOF\n>> \t\tgit -c merge.log=3 fmt-merge-msg <.git/FETCH_HEAD >msg &&\n>> \n>> \t\ttail -n 2 msg >actual &&\n>> \t\ttest_cmp expected actual\n>> \t'\n>\n> Ok. I don't like the `tail` thing. Why are you doing it instead of\n> comparing full outputs like the tests in the rest of the file?\n\nNo good reason. :)\n\nThanks,\nJonathan\n"}]}