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

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

From: Jonathan Tan <hidden>
Date: 2023-03-20 22:57:13

Patrick Steinhardt [off-list ref] writes:
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), 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.
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help