Subject: Re: [PATCH 2/8] fetch: move reference width calculation into `display_state`

From: Patrick Steinhardt <[email-masked]>
Date: Thu, 16 Mar 2023 16:05:54 +0100

On Wed, Mar 15, 2023 at 01:59:07PM -0700, Junio C Hamano wrote:
> Patrick Steinhardt <[email-masked]> writes:
> 
> > In order to print references in proper columns we need to calculate the
> > width of the reference column before starting to print the references.
> > This is done with the help of a global variable `refcol_width`.
> >
> > Refactor the code to instead use a new structure `display_state` that
> > contains the computed width and plumb it through the stack as required.
> > This is only the first step towards de-globalizing the state required to
> > print references.
> 
> Nice.
> 
> Given that in the previous step, what used to be called display got
> renamed to display_buffer (I think "buffer" ought to be sufficient
> in this context, though), the variable of "struct display_state"
> type should NOT be named "display", as it would be confusing when
> two things are related to "display" and only one of them is called
> as such.  Either "display_state" or "state" would be fine.

Fair enough. In that case I may just as well drop the first patch.

Patrick