diff options
| author | Junio C Hamano <gitster@pobox.com> | 2019-02-06 22:05:27 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2019-02-06 22:05:27 -0800 |
| commit | 75e1a08b605b48a89d45d3b4401495909e0a61bf (patch) | |
| tree | c18e6b7d4454a67d5c50edcc40d635f82ecd8b14 /help.c | |
| parent | cba595ab1a7764aecfde2e8e59994f89b2cd2f2e (diff) | |
| parent | 6195a76da4b0c58b320d8f7c3485ee51b0f2a8e6 (diff) | |
Merge branch 'nd/help-align-command-desc'
Output from "git help" was not correctly aligned, which has been
fixed.
* nd/help-align-command-desc:
help: align the longest command in the command listing
Diffstat (limited to 'help.c')
| -rw-r--r-- | help.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -85,7 +85,8 @@ static void print_command_list(const struct cmdname_help *cmds, if (cmds[i].category & mask) { size_t len = strlen(cmds[i].name); printf(" %s ", cmds[i].name); - mput_char(' ', longest > len ? longest - len : 1); + if (longest > len) + mput_char(' ', longest - len); puts(_(cmds[i].help)); } } |
