On Wed, Mar 15, 2023 at 01:59:07PM -0700, Junio C Hamano wrote: > Patrick Steinhardt 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