From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "SZEDER Gábor" <szeder.dev@gmail.com>,
"Sathyajith Bhat" <sathya@sathyasays.com>,
git@vger.kernel.org
Subject: Re: Re*: Segfault in git when using git logs
Date: Wed, 04 Nov 2020 12:16:36 -0800 [thread overview]
Message-ID: <xmqq361onahn.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20201104194155.GA3060815@coredump.intra.peff.net> (Jeff King's message of "Wed, 4 Nov 2020 14:41:55 -0500")
Jeff King <peff@peff.net> writes:
>> +# Basic command line option parsing
>> +test_expect_success '-L is incompatible with pathspec' '
>> + # This may fail due to "no such path a.c in commit",
>> + # or "-L is incompatible with pathspec". Either is acceptable.
>> + test_must_fail git log -L1,1:a.c -- a.c &&
>
> This test confuses me. What are we looking for here? Presumably we'd
> fail with:
>
> git log -L1,1:a.c
>
> too. If the test were "basic command line parsing", I could see checking
> that. But that's only what the comment says.
Yeah, I was undecided to have a single test that covers all (which I
ended up with) or a sequence of individual tests (which I wrote on
the title).
>> + # This must fail due to "-L is incompatible with pathspec".
>> + test_must_fail git log -L1,1:b.c -- b.c &&
>
> Right, this is what we fixed. Would using test_i18ngrep on the stderr be
> better than the comment?
I do not care either way myself ;-)
>> + # These must fail due to "follow requires one pathspec".
>> + test_must_fail git log -L1,1:b.c --follow &&
>> + test_must_fail git log --follow -L1,1:b.c &&
>
> These are really tests of --follow, but I don't mind seeing them here as
> reinforcement for the concepts that the commit message claims.
>
>> + # This may fail due to "-L is incompatible with pathspec",
>> + # or "-L is incompatible with pathspec". Either is acceptable.
>> + test_must_fail git log --follow -L1,1:b.c -- b.c
>
> Should one of those be "-L is incompatible with --follow"? Though of
> course we did not add such a check, so we know that it will be "-L is
> incompatible with pathspec", even without the --follow.
The comment seems utterly wrong here. I may reroll after taking a
nap or something ;-)
next prev parent reply other threads:[~2020-11-04 20:16 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-02 13:59 Segfault in git when using git logs Sathyajith Bhat
2020-11-02 14:43 ` Jeff King
2020-11-02 18:31 ` Junio C Hamano
2020-11-03 10:15 ` SZEDER Gábor
2020-11-03 11:21 ` Christian Couder
2020-11-03 16:10 ` Elijah Newren
2020-11-03 18:21 ` Jeff King
2020-11-03 18:34 ` Junio C Hamano
2020-11-03 18:57 ` Jeff King
2020-11-03 20:21 ` Junio C Hamano
2020-11-04 13:31 ` Jeff King
2020-11-04 16:26 ` Junio C Hamano
2020-11-04 17:54 ` Re*: " Junio C Hamano
2020-11-04 19:41 ` Jeff King
2020-11-04 20:16 ` Junio C Hamano [this message]
2020-11-04 20:35 ` [PATCH] log: diagnose -L used with pathspec as an error Junio C Hamano
2020-11-04 21:03 ` Jeff King
2020-11-03 18:46 ` Segfault in git when using git logs Derrick Stolee
2020-11-03 18:55 ` Sathyajith Bhat
2020-11-03 19:23 ` Jeff King
2020-11-03 20:07 ` Derrick Stolee
2020-11-03 21:04 ` Derrick Stolee
2020-11-04 15:49 ` Sathyajith Bhat
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=xmqq361onahn.fsf@gitster.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=sathya@sathyasays.com \
--cc=szeder.dev@gmail.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 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.