Man pages aren't found when used as git subcommand
$ git imerge --help
No manual entry for git-imerge
$ git-imerge --help
usage: git-imerge [-h]
...
So for some reason git-imerge can print help, but git can't find the appropriate manpages when invoking imerge as a subcommand.
Installation method was via homebrew. Possible this is something missing from the brew formula?
git imerge --help is intercepted by the git executable (i.e., git-imerge itself never runs). I believe that git then looks for and outputs a manpage called git-imerge. Since there is no such manpage, it doesn't work.
git-imerge --help invokes the git-imerge script itself, which asks argparse to generate help output based on the command-line options and their help strings, plus the file comment __doc__.
I don't think this is easy to fix, short of somebody writing a manpage for git-imerge. This, in turn, might be done by getting argparse to emit its output in TROFF format. I did something similar for the cvs2svn project, but haven't had time to do that yet here. Maybe argparse supports a standard way of doing this?
Is there currently a build step? Could run help2man on git-imerge and package the output as the manpage. (First naive attempt failed because git-imerge doesn't yet have --version :) )
Looks like no. Doing it in the makefile on install would require help2man on users' machines.
Do you know that -h works even when --help does not? Do you know why?
$ git imerge --help No manual entry for git-imerge See 'man 7 undocumented' for help when manual pages are not available. $ git imerge -h
usage: git-imerge [-h] {start,merge,rebase,drop,revert,continue,finish,diagram,list,init,record,autofill,simplify,remove,reparent} ...
Do you know that -h works even when --help does not?
I guess the git launcher hijacks --help but not -h.