wt-status: lift the artificual "at least 20 columns" floor

When we show unmerged paths, we had an artificial 20 columns floor
for the width of labels (e.g. "both deleted:") shown next to the
pathnames.  Depending on the locale, this may result in a label that
is too wide when all the label strings are way shorter than 20
columns, or no-op when a label string is longer than 20 columns.

Just drop the artificial floor.  The screen real estate is better
utilized this way when all the strings are shorter.

Adjust the tests to this change.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano 2014-03-12 13:43:51 -07:00
parent 8f17f5b22a
commit c7cb333f60
3 changed files with 13 additions and 15 deletions

View file

@ -318,8 +318,6 @@ static void wt_status_print_unmerged_data(struct wt_status *s,
if (!padding) {
label_width = maxwidth(wt_status_unmerged_status_string, 1, 7);
label_width += strlen(" ");
if (label_width < 20)
label_width = 20;
padding = xmallocz(label_width);
memset(padding, ' ', label_width);
}