Re: [PATCH 4/7] shortlog: support arbitrary commit format `--group`s
- From
Jeff King <peff@peff.net>
- Date
- Oct 11, 2022, 02:03 UTC
- Message-ID
- <Y0TO2I3PmUjJ5926@coredump.intra.peff.net>
- In-Reply-To
- <Y0TGuFDhoG1Nu6ND@nand.local>
On Mon, Oct 10, 2022 at 09:28:24PM -0400, Taylor Blau wrote:
Show 15 quoted lines
> On Mon, Oct 10, 2022 at 09:24:32PM -0400, Taylor Blau wrote:
> > > Makes sense. Two other tests that might be worth including:
> > >
> > > - "shortlog --group=bogus" generates an error (we might already have
> > > such a test; I didn't check)
> >
> > We didn't have such a test before, so adding one is a good call, thanks!
>
> Just writing back to say that this was a really good suggestion, since
> it caught my mistake in writing:
>
> } else if (strchrnul(arg, '%')) {
>
> since we'll always get back a non-NULL answer from calling `strchrnul`
> instead of `strchr`.I'm going to pretend that I noticed that bug and was gently leading you to it, rather than that I was oblivious and lucky.
-Peff