]> asedeno.scripts.mit.edu Git - git.git/commitdiff
Avoid ugly linewrap in git help
authorRen\e,bi\e(B Scharfe <rene.scharfe@lsrfire.ath.cx>
Sun, 11 Feb 2007 13:29:58 +0000 (14:29 +0100)
committerJunio C Hamano <junkio@cox.net>
Sun, 11 Feb 2007 20:42:01 +0000 (12:42 -0800)
Some of the short help texts that are shown e.g. when running 'git'
without any parameters wrap on a 80-column terminal.  They are just
one character over the line.  This patch avoids it by decreasing the
number of spaces around the preceding command name from four to
three (on both sides for symmetry).

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
help.c

diff --git a/help.c b/help.c
index 341b9e370eec4fa90014249a63afac17b083b275..b6674635a2e08197cc13aaa6acbe6290a303d6b3 100644 (file)
--- a/help.c
+++ b/help.c
@@ -168,8 +168,8 @@ static void list_common_cmds_help(void)
 
        puts("The most commonly used git commands are:");
        for (i = 0; i < ARRAY_SIZE(common_cmds); i++) {
-               printf("    %s", common_cmds[i].name);
-               mput_char(' ', longest - strlen(common_cmds[i].name) + 4);
+               printf("   %s   ", common_cmds[i].name);
+               mput_char(' ', longest - strlen(common_cmds[i].name));
                puts(common_cmds[i].help);
        }
        puts("(use 'git help -a' to get a list of all installed git commands)");