Thread (5 messages) 5 messages, 3 authors, 2021-03-15

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

flat view

From: Eric Sunshine <hidden>
Date: 2021-03-14 23:07:59

On Sun, Mar 14, 2021 at 6:43 PM Junio C Hamano [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help