Code

Documentation: Moving out of detached HEAD does not warn anymore.
[git.git] / help.c
diff --git a/help.c b/help.c
index 9ecdefdb03be7fac8d9283c93f2320f71bd062d6..b6674635a2e08197cc13aaa6acbe6290a303d6b3 100644 (file)
--- a/help.c
+++ b/help.c
@@ -3,12 +3,11 @@
  *
  * Builtin help-related commands (help, usage, version)
  */
-#include <sys/ioctl.h>
 #include "cache.h"
 #include "builtin.h"
 #include "exec_cmd.h"
 #include "common-cmds.h"
-
+#include <sys/ioctl.h>
 
 /* most GUI terminals set COLUMNS (although some don't export it) */
 static int term_columns(void)
@@ -169,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)");
@@ -184,7 +183,7 @@ static void show_man_page(const char *git_cmd)
                page = git_cmd;
        else {
                int page_len = strlen(git_cmd) + 4;
-               char *p = malloc(page_len + 1);
+               char *p = xmalloc(page_len + 1);
                strcpy(p, "git-");
                strcpy(p + 4, git_cmd);
                p[page_len] = 0;