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>
Johannes Schindelin committed
Sep 2, 2022 at 15:56 UTC
dd9603e22822fab19c0557dad0cf1825de325403
1 file changed
+2
builtin/help.c
+2
@@ -440,6 +440,8 @@ static const char *cmd_to_page(const char *git_cmd)
440
return git_cmd;
441
else if (is_git_command(git_cmd))
442
return xstrfmt("git-%s", git_cmd);
443
+ else if (!strcmp("scalar", git_cmd))
444
+ return xstrdup(git_cmd);
445
else
446
return xstrfmt("git%s", git_cmd);
447
}