Subject: Re: [PATCH 1/4] notes: print note blob to stdout directly

From: Junio C Hamano <[email-masked]>
Date: Mon, 05 Feb 2024 19:44:49 -0800

Maarten Bosmans <[email-masked]> writes:

> From: Maarten Bosmans <[email-masked]>
>
> From: Maarten Bosmans <[email-masked]>

Which one of you are you?  Please make up your mind and use only one
;-)  IOW, the first one is unneeded, as the latter matches what you
have on the S-o-b line.

> Avoid the need to launch a subprocess by calling stream_blob_to_fd
> directly.  This does not only get rid of the overhead of a separate
> child process, but also avoids the initalization of the whole log
> machinery that `git show` does.  That is needed for example to show
> decorated commits and applying the mailmap.  For simply displaying
> a blob however, the only useful thing show does is enabling the pager.
>
> Signed-off-by: Maarten Bosmans <[email-masked]>
> ---
>  builtin/notes.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)

I am not sure if we want to accept an approach that feels somewhat
narrow/short sighted, like this patch.  When "git show" learns an
improved way to show blob objects, who will update the code this
patch touches to teach it to use the same improved way to show the
notes?

I actually was hoping, after seeing the use case description in the
cover letter, that the series would be introducing a batch mode
interface to allow callers to ask notes for many objects and have
the command respond notes for these objects in a way that which
piece of output corresponds to which object in the request, reducing
the process overhead amortised over many objects.