]> git.99rst.org Git - git.git/commit
fetch: move reference width calculation into `display_state`
authorPatrick Steinhardt <redacted>
Mon, 20 Mar 2023 12:35:20 +0000 (13:35 +0100)
committerJunio C Hamano <redacted>
Mon, 20 Mar 2023 18:02:43 +0000 (11:02 -0700)
commitce9636d645714974e5f7e1e9abc65fa57186b147
treeacd0f09ee8631daf8f991b18be927894579e3ebc
parent73876f4861cd3d187a4682290ab75c9dccadbc56
fetch: move reference width calculation into `display_state`

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.

Signed-off-by: Patrick Steinhardt <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/fetch.c
git clone https://git.99rst.org/PROJECT