public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Trevor Saunders <tbsaunde@tbsaunde•org>
Cc: git@vger•kernel.org
Subject: Re: [PATCH] bisect: stop printing raw diff of first bad commit
Date: Thu, 28 May 2015 14:32:27 -0700	[thread overview]
Message-ID: <xmqqegm0fkwk.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1432829773-4754-1-git-send-email-tbsaunde@tbsaunde.org> (Trevor Saunders's message of "Thu, 28 May 2015 12:16:13 -0400")

Trevor Saunders <tbsaunde@tbsaunde•org> writes:

> Signed-off-by: Trevor Saunders <tbsaunde@tbsaunde•org>
> ---
> The test change only kind of tests the change in behavior and doesn't seem all
> that useful.  However I'm not sure if its preferable to not even try and test
> that something isn't output.

As the only objective of this patch is to stop showing that raw
format diff output, I think it is sensible to make sure that the
output no longer happens.

I have a feeling that this patch has some backstory?  It may be
necessary to summarize it in the log message to explain why this is
a good thing to do.

> diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh
> index 06b4868..eb820b2 100755
> --- a/t/t6030-bisect-porcelain.sh
> +++ b/t/t6030-bisect-porcelain.sh
> @@ -591,7 +591,8 @@ test_expect_success 'test bisection on bare repo - --no-checkout defaulted' '
>  			"test \$(git rev-list BISECT_HEAD ^$HASH2 --max-count=1 | wc -l) = 0" \
>  			>../defaulted.log
>  	) &&
> -	grep "$HASH3 is the first bad commit" defaulted.log
> +	grep "$HASH3 is the first bad commit" defaulted.log &&
> +	test 0 -eq $(grep -c '^:' defaulted.log)
>  '

Your single quotes around the pattern are not doing what you think
they are doing.

Why not write this line like this instead?

	! grep "^:" default.log

Thanks.

      reply	other threads:[~2015-05-28 21:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28 16:16 [PATCH] bisect: stop printing raw diff of first bad commit Trevor Saunders
2015-05-28 21:32 ` Junio C Hamano [this message]

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=xmqqegm0fkwk.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=tbsaunde@tbsaunde$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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