{"thread":{"id":"24813","subject":"[BUG] log: Non-zero exit code?","startedAt":"2010-08-21T06:22:00Z","lastAt":"2010-08-21T07:46:36Z","messageCount":4,"participants":["Ramkumar Ramachandra","René Scharfe"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"148642","messageId":"20100821062158.GJ6211@kytes","threadId":"24813","inReplyTo":null,"subject":"[BUG] log: Non-zero exit code?","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2010-08-21T06:22:00Z","receivedAt":"2010-08-21T06:22:00Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi,\n\nHere's a quick patch to illustrate the bug report. I initially thought\nBo Yang's series was at fault, but a quick checkout-make tells me that\nthe problem is much deeper- Am I doing something wrong? How did we not\nnotice this problem for so long?\n\n-- 8< --\nFrom: Ramkumar Ramachandra <artagnon@gmail.com>\nDate: Sat, 21 Aug 2010 11:44:13 +0530\nSubject: [PATCH] log: test to check exit code\n\nAdd a test to check the exit code of a simple 'git log'\ninvocation. The test currently fails: the exit code seems to be 141,\ninstead of the expected 0.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n t/t4202-log.sh |    6 ++++++\n 1 files changed, 6 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t4202-log.sh b/t/t4202-log.sh\nindex 2e51356..bd05bc9 100755\n--- a/t/t4202-log.sh\n+++ b/t/t4202-log.sh\n@@ -37,6 +37,12 @@ test_expect_success setup '\n \n '\n \n+test_expect_success 'exit code' '\n+\n+        git log\n+        test_cmp $? 0\n+'\n+\n printf \"sixth\\nfifth\\nfourth\\nthird\\nsecond\\ninitial\" > expect\n test_expect_success 'pretty' '\n \n-- \n1.7.2.2.409.gdbb11.dirty\n"},{"id":"148643","messageId":"20100821063116.GK6211@kytes","threadId":"24813","inReplyTo":"20100821062158.GJ6211@kytes","subject":"Re: [BUG] log: Non-zero exit code?","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2010-08-21T06:31:18Z","receivedAt":"2010-08-21T06:31:18Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi,\n\n> diff --git a/t/t4202-log.sh b/t/t4202-log.sh\n> index 2e51356..bd05bc9 100755\n> --- a/t/t4202-log.sh\n> +++ b/t/t4202-log.sh\n> @@ -37,6 +37,12 @@ test_expect_success setup '\n>  \n>  '\n>  \n> +test_expect_success 'exit code' '\n> +\n> +        git log\n> +        test_cmp $? 0\n> +'\n> +\n\nEr, I meant test $? = 0.\n\n-- Ram\n"},{"id":"148646","messageId":"4C6F8164.3020005@lsrfire.ath.cx","threadId":"24813","inReplyTo":"20100821062158.GJ6211@kytes","subject":"Re: [BUG] log: Non-zero exit code?","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2010-08-21T07:33:56Z","receivedAt":"2010-08-21T07:33:56Z","isPatch":false,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Am 21.08.2010 08:22, schrieb Ramkumar Ramachandra:\n> Hi,\n> \n> Here's a quick patch to illustrate the bug report. I initially thought\n> Bo Yang's series was at fault, but a quick checkout-make tells me that\n> the problem is much deeper- Am I doing something wrong? How did we not\n> notice this problem for so long?\n> \n> -- 8< --\n> From: Ramkumar Ramachandra <artagnon@gmail.com>\n> Date: Sat, 21 Aug 2010 11:44:13 +0530\n> Subject: [PATCH] log: test to check exit code\n> \n> Add a test to check the exit code of a simple 'git log'\n> invocation. The test currently fails: the exit code seems to be 141,\n> instead of the expected 0.\n> \n> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n> ---\n>  t/t4202-log.sh |    6 ++++++\n>  1 files changed, 6 insertions(+), 0 deletions(-)\n> \n> diff --git a/t/t4202-log.sh b/t/t4202-log.sh\n> index 2e51356..bd05bc9 100755\n> --- a/t/t4202-log.sh\n> +++ b/t/t4202-log.sh\n> @@ -37,6 +37,12 @@ test_expect_success setup '\n>  \n>  '\n>  \n> +test_expect_success 'exit code' '\n> +\n> +        git log\n> +        test_cmp $? 0\n> +'\n> +\n>  printf \"sixth\\nfifth\\nfourth\\nthird\\nsecond\\ninitial\" > expect\n>  test_expect_success 'pretty' '\n\n> Er, I meant test $? = 0.\n>\n> -- Ram\n\nYou can leave out the test line entirely, as test_expect_success already\nchecks for an exit code of zero.\n\nThe test passes for me with 1.7.2.2, next and pu.  Which version of git\ndo you use?\n\nError code 141 smells like the pager.  Can you reproduce the problem\nwithout the pager, i.e. like this?\n\n\tgit --no-pager log\n\nRené\n"},{"id":"148647","messageId":"20100821074633.GA31130@kytes","threadId":"24813","inReplyTo":"4C6F8164.3020005@lsrfire.ath.cx","subject":"Re: [BUG] log: Non-zero exit code?","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2010-08-21T07:46:36Z","receivedAt":"2010-08-21T07:46:36Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi René,\n\nRené Scharfe writes:\n> You can leave out the test line entirely, as test_expect_success already\n> checks for an exit code of zero.\n\nRight. I should have actually read test-lib.sh before submitting a\ntest :p\n\n> The test passes for me with 1.7.2.2, next and pu.  Which version of git\n> do you use?\n\nI can reproduce this on the latest `master` and `pu`.\n\n> Error code 141 smells like the pager.  Can you reproduce the problem\n> without the pager, i.e. like this?\n> \n> \tgit --no-pager log\n\nIndeed, it's a pager problem as Ævar pointed out on IRC. $(git\n--no-pager log) and $(GIT_PAGER='perl -pe \"\"' git log) return\n0. Something in `less` changed?\n\n-- Ram\n"}]}