From: Junio C Hamano Date: Mon, 9 Mar 2026 21:36:56 +0000 (-0700) Subject: Merge branch 'jk/repo-structure-cleanup' X-Git-Tag: v2.54.0-rc0~102 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=676c145afdd88024057296f11fdf2c224001549e;p=thirdparty%2Fgit.git Merge branch 'jk/repo-structure-cleanup' Code clean-up. * jk/repo-structure-cleanup: repo: remove unnecessary variable shadow --- 676c145afdd88024057296f11fdf2c224001549e diff --cc builtin/repo.c index f943be7451,e952778bbf..fae1141cff --- a/builtin/repo.c +++ b/builtin/repo.c @@@ -442,27 -274,14 +442,26 @@@ static void stats_table_print_structure for_each_string_list_item(item, &table->rows) { struct stats_table_entry *entry = item->util; const char *value = ""; + const char *unit = ""; if (entry) { - struct stats_table_entry *entry = item->util; value = entry->value; + if (entry->unit) + unit = entry->unit; } - printf("| %-*s | %*s |\n", name_col_width, item->string, - value_col_width, value); + strbuf_reset(&buf); + strbuf_addstr(&buf, "| "); + strbuf_utf8_align(&buf, ALIGN_LEFT, name_col_width, item->string); + strbuf_addstr(&buf, " | "); + strbuf_utf8_align(&buf, ALIGN_RIGHT, value_col_width, value); + strbuf_addch(&buf, ' '); + strbuf_utf8_align(&buf, ALIGN_LEFT, unit_col_width, unit); + strbuf_addstr(&buf, " |"); + printf("%s\n", buf.buf); } + + strbuf_release(&buf); } static void stats_table_clear(struct stats_table *table)