Thread (21 messages) 21 messages, 2 authors, 2023-03-22

Re: [PATCH v2 6/6] fetch: centralize printing of reference updates

From: Patrick Steinhardt <hidden>
Date: 2023-03-22 09:04:21

On Mon, Mar 20, 2023 at 03:57:02PM -0700, Jonathan Tan wrote:
Patrick Steinhardt [off-list ref] writes:
quoted
In order to print updated references during a fetch, the two different
call sites that do this will first call `format_display()` followed by a
call to `fputs()`. This is needlessly roundabout now that we have the
`display_state` structure that encapsulates all of the printing logic
for references.

Move displaying the reference updates into `format_display()` and rename
it to `display_ref_update()` to better match its new purpose, which
finalizes the conversion to make both the formatting and printing logic
of reference updates self-contained. This will make it easier to add new
output formats and printing to a different file descriptor than stderr.
Thanks. Patches 1-5 look good to me. As for this patch, I'm still not
convinced (I thought that the new mode would still print to stderr),
The reason why I decided against printing to stderr is that it's already
used by other things. The progress meter is one of these, runtime errors
are another one. I also think it's weird to have a parseable format that
should be parsed via stderr.

Anyway, let's discuss this once I'm posting the second patch series to
the mailing list.
but
if other reviewers are OK with it then that's fine. Alternatively, patch
6 could go with the next set of patches that implement the new mode of
printing ref updates.
I'd be fine either way. Thanks for your review!

Patrick

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help