Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--help.c9
1 files changed, 5 insertions, 4 deletions
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;