From: "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: git@vger.kernel.org, "D. Ben Knoble" <ben.knoble@gmail.com>
Subject: Re: [PATCH v3 1/2] format-patch: simplify get_notes_arg parameters
Date: Fri, 02 Oct 2026 20:51:38 +0200 [thread overview]
Message-ID: <d2360e73-6602-4418-af2e-265054ba8e2b@app.fastmail.com> (raw)
In-Reply-To: <xmqqtsn4xd17.fsf@gitster.g>
On Fri, Oct 2, 2026, at 18:50, Junio C Hamano wrote:
> kristofferhaugsbakk@fastmail.com writes:
>
>> From: Kristoffer Haugsbakk <code@khaugsbakk.name>
>>
>> 85bd88a7 (revision: add rdiff_log_arg to rev_info, 2025-09-25) added
>> `rdiff_log_arg` to `struct rev_info`. I changed `get_notes_arg` by
>> simply replacing the first argument with an access on this struct
>> member. But the second argument was already `struct rev_info`. So I
>> should have just simplified to *only* passing that parameter. Let’s do
>> that now.
>
> The readers do not necessarily want to read the "author's journey"
> narrative in log messages. Let's be more detached and objective,
> like
>
> 85bd88a7e8 (revision: add rdiff_log_arg to rev_info, 2025-09-25)
> updated get_notes_args() to push into rev->rdiff_log_arg instead
> of an explicit strvec, but left the rev argument as the second
> parameter and strvec *arg as the first. Simplify the signature of
> get_notes_args() to take only struct rev_info *rev, dropping the
> redundant strvec *arg parameter.
I don’t get what objective improvement there is by replacing “I did”
with “it happened”. This is not a gratuitous incidental biography but
just says what your alternative says, only with a personal pronoun, less
technical diction, and one word longer.
But I think we can shorten it with a little show-don’t-tell:
85bd88a7 (revision: add rdiff_log_arg to rev_info, 2025-09-25) added
`rdiff_log_arg` to `struct rev_info`. `get_notes_arg` was changed to
take a second parameter, namely that member:
get_notes_args(&(rev.rdiff_log_arg), &rev);
But this is obviously unnecessary; we can just use `&rev`.
Now is also a good time to format this `for_each...` line since it’s
gotten quite long.
That’s 16 words less than my first version.
>
> perhaps?
>
>> Now is also a good time to format this `for_each...` line since it’s
>> gotten quite long.
>>
>> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
>> ---
>>
>> Notes (testing):
>> just compile tested
>
> The code change looks good. As long as this stays as a static helper
> function, this is not a loss of flexibility but a simplification of
> the calling convention.
>
Thanks for reviewing.
next prev parent reply other threads:[~2026-10-02 18:52 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 20:35 [PATCH 0/3] format-patch: learn --[no-]range-diff-notes kristofferhaugsbakk
2026-08-24 20:35 ` [PATCH 1/3] format-patch: simplify get_notes_arg parameters kristofferhaugsbakk
2026-08-24 20:35 ` [PATCH 2/3] revision.h: rename struct member to reflect notes role kristofferhaugsbakk
2026-08-24 20:35 ` [PATCH 3/3] format-patch: learn --[no-]range-diff-notes kristofferhaugsbakk
2026-08-24 22:31 ` Junio C Hamano
2026-08-25 18:36 ` Kristoffer Haugsbakk
2026-08-28 0:31 ` Junio C Hamano
2026-08-28 13:48 ` Kristoffer Haugsbakk
2026-08-28 17:13 ` Junio C Hamano
2026-09-02 13:19 ` Kristoffer Haugsbakk
2026-09-06 7:22 ` Kristoffer Haugsbakk
2026-09-06 13:37 ` D. Ben Knoble
2026-09-06 16:44 ` Kristoffer Haugsbakk
2026-09-06 17:57 ` D. Ben Knoble
2026-09-06 17:12 ` Junio C Hamano
2026-09-09 18:08 ` Kristoffer Haugsbakk
2026-09-09 19:04 ` Junio C Hamano
2026-09-26 18:27 ` [PATCH v2 0/2] " kristofferhaugsbakk
2026-09-26 18:27 ` [PATCH v2 1/2] format-patch: simplify get_notes_arg parameters kristofferhaugsbakk
2026-09-26 18:27 ` [PATCH v2 2/2] format-patch: learn --[no-]range-diff-notes kristofferhaugsbakk
2026-09-27 12:50 ` Junio C Hamano
2026-09-27 19:42 ` Kristoffer Haugsbakk
2026-09-28 15:35 ` Junio C Hamano
2026-09-28 15:53 ` Kristoffer Haugsbakk
2026-10-02 10:56 ` [PATCH v3 0/2] " kristofferhaugsbakk
2026-10-02 10:56 ` [PATCH v3 1/2] format-patch: simplify get_notes_arg parameters kristofferhaugsbakk
2026-10-02 16:50 ` Junio C Hamano
2026-10-02 18:51 ` Kristoffer Haugsbakk [this message]
2026-10-02 19:07 ` Kristoffer Haugsbakk
2026-10-02 19:13 ` Kristoffer Haugsbakk
2026-10-02 10:56 ` [PATCH v3 2/2] format-patch: learn --[no-]range-diff-notes kristofferhaugsbakk
2026-10-02 17:28 ` Junio C Hamano
2026-10-02 18:56 ` Kristoffer Haugsbakk
2026-10-04 10:17 ` [PATCH v4 0/2] " kristofferhaugsbakk
2026-10-04 10:17 ` [PATCH v4 1/2] format-patch: simplify get_notes_arg parameters kristofferhaugsbakk
2026-10-04 10:17 ` [PATCH v4 2/2] format-patch: learn --[no-]range-diff-notes kristofferhaugsbakk
2026-10-04 16:25 ` Junio C Hamano
2026-10-04 17:30 ` Kristoffer Haugsbakk
2026-10-04 17:58 ` [PATCH v5 0/2] " kristofferhaugsbakk
2026-10-04 17:58 ` [PATCH v5 1/2] format-patch: simplify get_notes_arg parameters kristofferhaugsbakk
2026-10-04 17:58 ` [PATCH v5 2/2] format-patch: learn --[no-]range-diff-notes 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=d2360e73-6602-4418-af2e-265054ba8e2b@app.fastmail.com \
--to=kristofferhaugsbakk@fastmail.com \
--cc=ben.knoble@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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