summaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-03-12 13:43:51 -0700
committerJunio C Hamano <gitster@pobox.com>2014-03-12 14:08:05 -0700
commitc7cb333f60db9b8313da75c2075a3619202e905d (patch)
treedaae21981cec440dd5db73eebc35c1d1a36c7eda /wt-status.c
parent8f17f5b22ae54ecc3dfdafe33d7697e1bf3949f6 (diff)
downloadgit-c7cb333f60db9b8313da75c2075a3619202e905d.tar.gz
wt-status: lift the artificual "at least 20 columns" floorjn/wt-status
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>
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/wt-status.c b/wt-status.c
index b1b018e54e..6f3ed67fc9 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -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);
}