summaryrefslogtreecommitdiff
path: root/builtin/commit-graph.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2023-05-10 14:34:20 +0200
committerJunio C Hamano <gitster@pobox.com>2023-05-10 10:35:25 -0700
commit9539638a2bbc88717547585ae660bba3bbfaef8b (patch)
treef8cd3931efd2f57a24d114abd8df57e22ca50525 /builtin/commit-graph.c
parent1c31764dda4fd4aacdcc95c4a53b8c778a2f9de2 (diff)
fetch: refactor calculation of the display table width
When displaying reference updates, we try to print the references in a neat table. As the table's width is determined its contents we thus need to precalculate the overall width before we can start printing updated references. The calculation is driven by `display_state_init()`, which invokes `refcol_width()` for every reference that is to be printed. This split is somewhat confusing. For one, we filter references that shall be attributed to the overall width in both places. And second, we needlessly recalculate the maximum line length based on the terminal columns and display format for every reference. Refactor the code so that the complete width calculations are neatly contained in `refcol_width()`. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions