git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] add-patch: enforce only one-letter response to prompts

From
DSDragan Simic <dsimic@manjaro.org>
Date
May 22, 2024, 19:03 UTC
Message-ID
<11abab810253d654119fab69adf44fab@manjaro.org>
In-Reply-To
<xmqqzfsh6cjf.fsf@gitster.g>
On 2024-05-22 18:23, Junio C Hamano wrote:
Show 9 quoted lines
> Dragan Simic <dsimic@manjaro.org> writes:
>> On 2024-05-22 01:20, Junio C Hamano wrote:
>>> 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.

Yes, "single-key mode" is better; "when interactive.singlekey is not enabled" may be even a bit better. Not worth a reroll, of course.

Show 14 quoted lines
>>> +		/* '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

That's exactly what I assumed, but frankly, in this particular case I really can't force myself, despite trying quite hard, into liking it. It's simply strange to me.

Previous: Junio C HamanoNext: Junio C Hamano
Message 12 of 21 in “add-patch: response to unknown command”
  1. add-patch: response to unknown commandRubén Justo, May 21, 2024
  2. Patrick SteinhardtMay 21, 2024
  3. Rubén JustoMay 21, 2024
  4. Re* [PATCH] add-patch: response to unknown commandJunio C Hamano, May 21, 2024
  5. Taylor BlauMay 21, 2024
  6. Junio C HamanoMay 21, 2024
  7. add-patch: enforce only one-letter response to promptsJunio C Hamano, May 21, 2024
  8. Eric SunshineMay 21, 2024
  9. Junio C HamanoMay 22, 2024
  10. Dragan SimicMay 22, 2024
  11. Junio C HamanoMay 22, 2024
  12. Dragan SimicMay 22, 2024
  13. Junio C HamanoMay 22, 2024
  14. Patrick SteinhardtMay 22, 2024
  15. Junio C HamanoMay 22, 2024
  16. add-patch: enforce only one-letter response to promptsJunio C Hamano, May 22, 2024
  17. Rubén JustoMay 22, 2024
  18. Junio C HamanoMay 22, 2024
  19. add-patch: enforce only one-letter response to promptsJunio C Hamano, May 22, 2024
  20. Patrick SteinhardtMay 23, 2024
  21. Junio C HamanoMay 23, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.