summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--help.c5
-rwxr-xr-xt/t0012-help.sh1
2 files changed, 4 insertions, 2 deletions
diff --git a/help.c b/help.c
index 45a21e7..afd3af2 100644
--- a/help.c
+++ b/help.c
@@ -124,7 +124,8 @@ static void print_cmd_by_category(const struct category_description *catdesc,
uint32_t mask = catdesc[i].category;
const char *desc = catdesc[i].desc;
- putchar('\n');
+ if (i)
+ putchar('\n');
puts(_(desc));
print_command_list(cmds, mask, longest);
}
@@ -328,6 +329,7 @@ void list_commands(struct cmdnames *main_cmds, struct cmdnames *other_cmds)
void list_common_cmds_help(void)
{
puts(_("These are common Git commands used in various situations:"));
+ putchar('\n');
print_cmd_by_category(common_categories, NULL);
}
@@ -481,6 +483,7 @@ void list_all_cmds_help(int show_external_commands, int show_aliases)
int longest;
puts(_("See 'git help <command>' to read about a specific subcommand"));
+ putchar('\n');
print_cmd_by_category(main_categories, &longest);
if (show_external_commands)
diff --git a/t/t0012-help.sh b/t/t0012-help.sh
index 6432148..6c3e1f7 100755
--- a/t/t0012-help.sh
+++ b/t/t0012-help.sh
@@ -226,7 +226,6 @@ test_expect_success "'git help -a' section spacing" '
test_expect_success "'git help -g' section spacing" '
test_section_spacing_trailer git help -g <<-\EOF &&
-
The Git concept guides are:
EOF