Re: [PATCH v4 2/6] commit: add amend suboption to --fixup to create amend! commit
- From
Charvi Mendiratta <charvi077@gmail.com>
- Date
- Mar 15, 2021, 07:59 UTC
- Message-ID
- <CAPSFM5fQeB8dOQRzWkwAJCkHtNb2GXUWqgJUHCWoJh0vdDp_Fg@mail.gmail.com>
- In-Reply-To
- <CAPig+cTO0umN4nAQi_qZEvTByCHFVavM-KbtfhkukXEUdzLPhg@mail.gmail.com>
On Mon, 15 Mar 2021 at 04:37, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 20 quoted lines
>
> On Sun, Mar 14, 2021 at 6:43 PM Junio C Hamano <gitster@pobox.com> 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