All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Matthew DeVore <matvore@google.com>
Cc: git@vger.kernel.org, pclouds@gmail.com, peff@peff.net,
	jonathantanmy@google.com, jeffhost@microsoft.com,
	matvore@comcast.net
Subject: Re: [RFC 2/2] exclude-promisor-objects: declare when option is allowed
Date: Tue, 23 Oct 2018 14:08:10 +0900	[thread overview]
Message-ID: <xmqqin1ts11h.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <931421945c040ba4518d91f7af9f386d0136bd2f.1540256910.git.matvore@google.com> (Matthew DeVore's message of "Mon, 22 Oct 2018 18:13:42 -0700")

Matthew DeVore <matvore@google.com> writes:

>  t/t4202-log.sh         | 4 ++++
>  t/t8002-blame.sh       | 4 ++++
>  7 files changed, 14 insertions(+), 1 deletion(-)
> ...
> diff --git a/t/t4202-log.sh b/t/t4202-log.sh
> index 153a506151..819c24d10e 100755
> --- a/t/t4202-log.sh
> +++ b/t/t4202-log.sh
> @@ -1703,4 +1703,8 @@ test_expect_success 'log --source paints symmetric ranges' '
>  	test_cmp expect actual
>  '
>  
> +test_expect_success '--exclude-promisor-objects does not BUG-crash' '
> +	test_must_fail git log --exclude-promisor-objects source-a
> +'
> +
>  test_done
> diff --git a/t/t8002-blame.sh b/t/t8002-blame.sh
> index 380e1c1054..eea048e52c 100755
> --- a/t/t8002-blame.sh
> +++ b/t/t8002-blame.sh
> @@ -118,4 +118,8 @@ test_expect_success '--no-abbrev works like --abbrev=40' '
>  	check_abbrev 40 --no-abbrev
>  '
>  
> +test_expect_success '--exclude-promisor-objects does not BUG-crash' '
> +	test_must_fail git blame --exclude-promisor-objects one
> +'
> +
>  test_done

OK.  We used to be hitting BUG() which is an abort() in disguise, so
must-fail would have caught it without the fix in this patch.  Now
we would see a more controlled failure.

    ... goes and makes sure that is the case ...

Not really.  We were already doing a controlled failure via die(),
so these two tests would not have caught the problem in the code
before the fix in this patch.

But nevertheless this is a good change; I do not think it is worth
grepping for "unrecognized option" to differentiate the two cases.

Thanks.

  reply	other threads:[~2018-10-23  5:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-23  1:13 [RFC 0/2] explicitly support or not support --exclude-promisor-objects Matthew DeVore
2018-10-23  1:13 ` [RFC 1/2] Documentation/git-log.txt: do not show --exclude-promisor-objects Matthew DeVore
2018-10-23  1:13 ` [RFC 2/2] exclude-promisor-objects: declare when option is allowed Matthew DeVore
2018-10-23  5:08   ` Junio C Hamano [this message]
2018-10-23 17:55     ` Matthew DeVore
2018-10-24  1:31       ` Junio C Hamano
2018-11-21 16:40   ` Jeff King
2018-12-01  1:32     ` Matthew DeVore
2018-12-01 19:44       ` Jeff King
2018-12-03 19:10         ` Matthew DeVore
2018-12-03 21:15           ` Jeff King
2018-12-03 21:54             ` Matthew DeVore
2018-12-04  2:20             ` Junio C Hamano
2018-12-03 19:23         ` [PATCH] revisions.c: put promisor option in specialized struct Matthew DeVore
2018-12-03 21:24           ` Jeff King
2018-12-03 22:01             ` Matthew DeVore
2018-10-23  1:18 ` [RFC 0/2] explicitly support or not support --exclude-promisor-objects Matthew DeVore
2018-10-23  4:48 ` Junio C Hamano
2018-10-23 17:09   ` Matthew DeVore

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=xmqqin1ts11h.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jeffhost@microsoft.com \
    --cc=jonathantanmy@google.com \
    --cc=matvore@comcast.net \
    --cc=matvore@google.com \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.