diff --git a/help.c b/help.c index 7e594d291b..8a09f18a3d 100644 --- a/help.c +++ b/help.c @@ -44,16 +44,17 @@ static struct category_description main_categories[] = { static const char *drop_prefix(const char *name, uint32_t category) { const char *new_name; - const char *prefix = NULL; + const char *prefix; - if (skip_prefix(name, "git-", &new_name)) - return new_name; switch (category) { case CAT_guide: prefix = "git"; break; + default: + prefix = "git-"; + break; } - if (prefix && skip_prefix(name, prefix, &new_name)) + if (skip_prefix(name, prefix, &new_name)) return new_name; return name;