Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue. What did you do before the bug happened? (Steps to reproduce your issue) git help nosuchcommand What did you expect to happen? (Expected behavior) An error message: "No manual entry for git-nosuchcommand" What happened instead? (Actual behavior) An error message: "No manual entry for gitnosuchcommand" What's different between what you expected and what actually happened? The hyphen. If "nosuchcommand" were a git command, the man page would be readable by typing "man git-nosuchcommand". The error message should reflect that. (The error message is actually produced by the "man" command.) Anything else you want to add: Proposed patch (works on my system): ``` commit 148f2e07a7dbdbe72fa0bd4340b76cba12a19a24 (HEAD -> fix-help-bug) Author: Keith Thompson <Keith.S.Thompson@xxxxxxxxx> Date: 2025-04-17 15:35:44 -0700 Fix "git help" message for nonexistent subcommand diff --git builtin/help.c builtin/help.c index c257079ceb..792549864f 100644 --- builtin/help.c +++ builtin/help.c @@ -450,7 +450,7 @@ static const char *cmd_to_page(const char *git_cmd) else if (!strcmp("scalar", git_cmd)) return xstrdup(git_cmd); else - return xstrfmt("git%s", git_cmd); + return xstrfmt("git-%s", git_cmd); } static void setup_man_path(void) ``` Please review the rest of the bug report below. You can delete any lines you don't wish to share. [System Info] git version: git version 2.49.0 cpu: x86_64 built from commit: 683c54c999c301c2cd6f715c411407c413b1d84e sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh libcurl: 8.5.0 OpenSSL: OpenSSL 3.0.13 30 Jan 2024 zlib: 1.3 uname: Linux 6.11.0-24-generic #24~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Mar 25 20:14:34 UTC 2 x86_64 compiler info: gnuc: 13.3 libc info: glibc: 2.39 $SHELL (typically, interactive shell): /o/bin/bash [Enabled Hooks]