Re: [PATCH v4 2/6] commit: add amend suboption to --fixup to create amend! commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 15 Mar 2021 at 04:37, Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
>
> On Sun, Mar 14, 2021 at 6:43 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
> > FWIW I am also fine with Eric's simpler "open code it right there"
> > suggestion in this case.  Just like the "skip alphas" suggestion, it
> > makes the logic to parse subcommand name out isolated to a single
> > place without asking readers to refer to the implementation of a
> > helper, and it would be short enough.
>
> Likewise. If you're going to re-roll anyhow, the open-coded:
>
>     char *p = fixup_mesage;
>     while (isalpha(*p))
>         p++;
>     if (p > fixup_message && *p == ':') {
>         *p = '\0';
>         fixup_commit = p + 1;
>
> would be perfectly fine with me too (or any simple variation on that
> theme). Whether or not it's worth re-rolling again, I leave up to you
> and Junio.

okay, I agree too. I have updated it in the re-roll.

Thanks for all the detailed reviews and suggestions.

Thanks and Regards,
Charvi



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux