From: Junio C Hamano <gitster@pobox.com>
To: "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/2] revision: add rdiff_other_arg to rev_info
Date: Tue, 23 Sep 2025 14:18:07 -0700 [thread overview]
Message-ID: <xmqqtt0sookw.fsf@gitster.g> (raw)
In-Reply-To: <f1da0f06-e57c-4abd-b9ce-ef3fd5ce2037@app.fastmail.com> (Kristoffer Haugsbakk's message of "Tue, 23 Sep 2025 19:47:52 +0200")
"Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com> writes:
>>> 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.
next prev parent reply other threads:[~2025-09-23 21:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-22 21:10 [PATCH 0/2] format-patch: handle range-diff on notes correctly for single patches kristofferhaugsbakk
2025-09-22 21:10 ` [PATCH 1/2] revision: add rdiff_other_arg to rev_info kristofferhaugsbakk
2025-09-22 21:58 ` Junio C Hamano
2025-09-23 15:53 ` Kristoffer Haugsbakk
2025-09-23 17:35 ` Junio C Hamano
2025-09-23 17:47 ` Kristoffer Haugsbakk
2025-09-23 21:18 ` Junio C Hamano [this message]
2025-09-22 21:10 ` [PATCH 2/2] format-patch: handle range-diff on notes correctly for single patches kristofferhaugsbakk
2025-09-22 22:01 ` Junio C Hamano
2025-09-23 16:26 ` Kristoffer Haugsbakk
2025-09-23 21:20 ` Junio C Hamano
2025-09-25 17:07 ` [PATCH v2 0/3] " kristofferhaugsbakk
2025-09-25 17:07 ` [PATCH v2 1/3] range-diff: rename other_arg to log_arg kristofferhaugsbakk
2025-09-25 17:07 ` [PATCH v2 2/3] revision: add rdiff_log_arg to rev_info kristofferhaugsbakk
2025-09-25 17:07 ` [PATCH v2 3/3] format-patch: handle range-diff on notes correctly for single patches kristofferhaugsbakk
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=xmqqtt0sookw.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=kristofferhaugsbakk@fastmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).