git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [BUG] log: Non-zero exit code?
Date: Sat, 21 Aug 2010 09:33:56 +0200	[thread overview]
Message-ID: <4C6F8164.3020005@lsrfire.ath.cx> (raw)
In-Reply-To: <20100821062158.GJ6211@kytes>

Am 21.08.2010 08:22, schrieb Ramkumar Ramachandra:
> Hi,
> 
> Here's a quick patch to illustrate the bug report. I initially thought
> Bo Yang's series was at fault, but a quick checkout-make tells me that
> the problem is much deeper- Am I doing something wrong? How did we not
> notice this problem for so long?
> 
> -- 8< --
> From: Ramkumar Ramachandra <artagnon@gmail.com>
> Date: Sat, 21 Aug 2010 11:44:13 +0530
> Subject: [PATCH] log: test to check exit code
> 
> Add a test to check the exit code of a simple 'git log'
> invocation. The test currently fails: the exit code seems to be 141,
> instead of the expected 0.
> 
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> ---
>  t/t4202-log.sh |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/t/t4202-log.sh b/t/t4202-log.sh
> index 2e51356..bd05bc9 100755
> --- a/t/t4202-log.sh
> +++ b/t/t4202-log.sh
> @@ -37,6 +37,12 @@ test_expect_success setup '
>  
>  '
>  
> +test_expect_success 'exit code' '
> +
> +        git log
> +        test_cmp $? 0
> +'
> +
>  printf "sixth\nfifth\nfourth\nthird\nsecond\ninitial" > expect
>  test_expect_success 'pretty' '

> Er, I meant test $? = 0.
>
> -- Ram

You can leave out the test line entirely, as test_expect_success already
checks for an exit code of zero.

The test passes for me with 1.7.2.2, next and pu.  Which version of git
do you use?

Error code 141 smells like the pager.  Can you reproduce the problem
without the pager, i.e. like this?

	git --no-pager log

René

  parent reply	other threads:[~2010-08-21  7:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-21  6:22 [BUG] log: Non-zero exit code? Ramkumar Ramachandra
2010-08-21  6:31 ` Ramkumar Ramachandra
2010-08-21  7:33 ` René Scharfe [this message]
2010-08-21  7:46   ` 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=4C6F8164.3020005@lsrfire.ath.cx \
    --to=rene.scharfe@lsrfire.ath.cx \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).