]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git help: special-case `scalar`
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 2 Sep 2022 15:56:44 +0000 (15:56 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 2 Sep 2022 17:02:56 +0000 (10:02 -0700)
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>
builtin/help.c

index 09ac4289f13065a20e0fb50d08d0a784d3dab8e0..6f2796f211e24c47c2efd3b1dfe52d8b8b757865 100644 (file)
@@ -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);
 }