Subject: [PATCH 3/8] git help: special-case `scalar`

From: "Johannes Schindelin via GitGitGadget" <[email-masked]>
Date: Wed, 31 Aug 2022 16:02:20 +0000

From: Johannes Schindelin <[email-masked]>

With this commit, `git help scalar` will open the appropriate manual
or HTML page (instead of looking for `gitscalar`).

Signed-off-by: Johannes Schindelin <[email-masked]>
Signed-off-by: Victoria Dye <[email-masked]>
---
 builtin/help.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/builtin/help.c b/builtin/help.c
index 09ac4289f13..6f2796f211e 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);
 }
-- 
gitgitgadget