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

Re: [PATCH 1/2] revision: add rdiff_other_arg to rev_info

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 23, 2025, 21:18 UTC
Message-ID
<xmqqtt0sookw.fsf@gitster.g>
In-Reply-To
<f1da0f06-e57c-4abd-b9ce-ef3fd5ce2037@app.fastmail.com>
"Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com> writes:
Show 10 quoted lines
>>> Could it be as simple as `log_arg` or `log_args`?
>>
>> Yeah, that is much better than "other" (where it is unclear what are
>> the "primary" things that "others" are in contrast).
>
> I remember looking at the code and having that realization: Oh, *other*
> is *log*.  Huh.
>
> ... Maybe specifically `log_args` since it’s a `strvec`?  `git grep
> 'struct strvec'` seems to give me a lot of plural (style).

If you were asking me about singular vs plural, sorry, I didn't even realize that was the quesiton being asked.

My personal preference is to name arrays singular so that you can name its 0th element by saying dog[0], not dogs[0]. "dog[1] and dog[2] are friends" not dogs[1] and dogs[2]. An exception is when most of the time you use the array as a single unit as a collection, passing it around in the call chain, rarely addressing each individual element. I am OK to see such an array called plural (but of course, singular names are always fine)..

An instance of "struct strvec" may fall into the same category as the latter. A single "struct strvec args" may be used as a collection of arguments passed to the program .

So, log_args is fine by me.
Previous: Kristoffer HaugsbakkNext: kristofferhaugsbakk@fastmail.com
Message 7 of 15 in “format-patch: handle range-diff on notes correctly for single patches”
  1. 0/2 format-patch: handle range-diff on notes correctly for single patcheskristofferhaugsbakk@fastmail.com, Sep 22, 2025
  2. 1/2 revision: add rdiff_other_arg to rev_infokristofferhaugsbakk@fastmail.com, Sep 22, 2025
  3. Junio C HamanoSep 22, 2025
  4. Kristoffer HaugsbakkSep 23, 2025
  5. Junio C HamanoSep 23, 2025
  6. Kristoffer HaugsbakkSep 23, 2025
  7. Junio C HamanoSep 23, 2025
  8. 2/2 format-patch: handle range-diff on notes correctly for single patcheskristofferhaugsbakk@fastmail.com, Sep 22, 2025
  9. Junio C HamanoSep 22, 2025
  10. Kristoffer HaugsbakkSep 23, 2025
  11. Junio C HamanoSep 23, 2025
  12. 0/3 format-patch: handle range-diff on notes correctly for single patcheskristofferhaugsbakk@fastmail.com, Sep 25, 2025
  13. 1/3 range-diff: rename other_arg to log_argkristofferhaugsbakk@fastmail.com, Sep 25, 2025
  14. 2/3 revision: add rdiff_log_arg to rev_infokristofferhaugsbakk@fastmail.com, Sep 25, 2025
  15. 3/3 format-patch: handle range-diff on notes correctly for single patcheskristofferhaugsbakk@fastmail.com, Sep 25, 2025

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.