summaryrefslogtreecommitdiff
path: root/builtin/help.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2022-09-02 15:56:44 +0000
committerJunio C Hamano <gitster@pobox.com>2022-09-02 10:02:56 -0700
commitdd9603e22822fab19c0557dad0cf1825de325403 (patch)
tree5b648ca2507be8e333a04d956e885352152ee31c /builtin/help.c
parent7b5c93c6c6847b4b6037e38418bc8bbb8c2eada8 (diff)
downloadgit-dd9603e22822fab19c0557dad0cf1825de325403.tar.gz
git help: special-case `scalar`
With this commit, `git help scalar` will open the appropriate manual or HTML page (instead of looking for `gitscalar`). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Victoria Dye <vdye@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/help.c')
-rw-r--r--builtin/help.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/help.c b/builtin/help.c
index 09ac4289f1..6f2796f211 100644
--- a/builtin/help.c
+++ b/builtin/help.c
@@ -440,6 +440,8 @@ static const char *cmd_to_page(const char *git_cmd)
return git_cmd;
else if (is_git_command(git_cmd))
return xstrfmt("git-%s", git_cmd);
+ else if (!strcmp("scalar", git_cmd))
+ return xstrdup(git_cmd);
else
return xstrfmt("git%s", git_cmd);
}