From: Junio C Hamano <gitster@pobox.com>
To: Dragan Simic <dsimic@manjaro.org>
Cc: git@vger.kernel.org, Taylor Blau <me@ttaylorr.com>,
Patrick Steinhardt <ps@pks.im>
Subject: Re: [PATCH v2] add-patch: enforce only one-letter response to prompts
Date: Wed, 22 May 2024 09:23:32 -0700 [thread overview]
Message-ID: <xmqqzfsh6cjf.fsf@gitster.g> (raw)
In-Reply-To: <fbb9c7d3e7c2129bc1526dfa5a8eca0c@manjaro.org> (Dragan Simic's message of "Wed, 22 May 2024 08:40:47 +0200")
Dragan Simic <dsimic@manjaro.org> writes:
> Hello Junio,
>
> Please see my comments below.
>
> On 2024-05-22 01:20, Junio C Hamano wrote:
>> In an "git add -p" session, especially when we are not using the
>
> s/In an/In a/
Good eyes.
>
>> single-char mode, we may see 'qa' as a response to a prompt
>
> Perhaps s/single-char/single-character/
I shouldn't have been loose in the language. Rather, we should say
"single key mode", as the knob to control the feature is the
"interactive.singlekey" variable.
>> + /* 'g' takes a hunk number, '/' takes a regexp */
>> + if (1 < s->answer.len && (ch != 'g' && ch != '/')) {
>
> To me, "s->answer.len > 1" would be much more readable, and
> I was surprised a bit to see the flipped variant. This made
> me curious; would you, please, let me know why do you prefer
> this form?
"textual order should reflect actual order" (read CodingGuidelines).
For more backstory,
https://lore.kernel.org/git/?q=%22textual+order%22+%22actual+order%22
Thanks.
next prev parent reply other threads:[~2024-05-22 16:23 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-21 0:37 [PATCH] add-patch: response to unknown command Rubén Justo
2024-05-21 7:03 ` Patrick Steinhardt
2024-05-21 12:59 ` Rubén Justo
2024-05-21 15:52 ` Re* " Junio C Hamano
2024-05-21 22:27 ` Taylor Blau
2024-05-21 23:06 ` Junio C Hamano
2024-05-21 23:20 ` [PATCH v2] add-patch: enforce only one-letter response to prompts Junio C Hamano
2024-05-21 23:36 ` Eric Sunshine
2024-05-22 0:49 ` Junio C Hamano
2024-05-22 6:40 ` Dragan Simic
2024-05-22 16:23 ` Junio C Hamano [this message]
2024-05-22 19:03 ` Dragan Simic
2024-05-22 20:41 ` Junio C Hamano
2024-05-22 11:07 ` Patrick Steinhardt
2024-05-22 16:27 ` Junio C Hamano
2024-05-22 17:14 ` [PATCH v3] " Junio C Hamano
2024-05-22 17:38 ` Rubén Justo
2024-05-22 19:27 ` Junio C Hamano
2024-05-22 21:45 ` [PATCH v4] " Junio C Hamano
2024-05-23 5:31 ` Patrick Steinhardt
2024-05-23 15:58 ` Junio C Hamano
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=xmqqzfsh6cjf.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=dsimic@manjaro.org \
--cc=git@vger.kernel.org \
--cc=me@ttaylorr.com \
--cc=ps@pks.im \
/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.