git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git help error

From
SOSergei Organov <osv@javad.com>
Date
Dec 6, 2007, 18:36 UTC
Message-ID
<87k5nr7jse.fsf@osv.gnss.ru>
In-Reply-To
<7vr6i245b4.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 37 quoted lines
> Sergei Organov <osv@javad.com> writes:
>
>> Junio C Hamano <gitster@pobox.com> writes:
>>> "Aneesh Kumar" <aneesh.kumar@gmail.com> writes:
>>>
>>>> git help gives me the below error.
>>>>
>>>> [master@git]$ git help add
>>>> No manual entry for git-add
>>>> See 'man 7 undocumented' for help when manual pages are not available.
>>>> [master@git]$
>>>>
>>>> I have the git binaries installed via --prefix
>>>>
>>>> ./configure --prefix=/home/kvaneesh/bin-local/git/
>>>> and to see the man page i have to say
>>>>
>>>> man -M /home/kvaneesh/bin-local/git/share/man/
>>> ...
>>> When you run "man" from the command line, can you say
>>>
>>>      $ man git-add
>>>
>>> and make it work?  If it fails the same way, then what you are missing
>>> is MANPATH environment variable, isn't it?
>>
>> I think what the OP asked for makes sense. git-help should better find
>> corresponding version of manual pages automatically. This way, if one
>> invokes different versions of git-help, he will get corresponding
>> version of help text.
>
> I do not necessarily agree.  Read what Aneesh wrote originally again,
> and read what he _didn't_ write.
>
> Not only he needs to run his "man" with -M (and my point was that it is
> not the only way, by the way), he needs to futz with his $PATH to
> include $HOME/bin-local/git for _his_ installation to work.

My point is that he doesn't need to tweak his $PATH, because he can simply say:

$ ~/bin-local/git/bin/git help add

Then, I'd expect that the manual page that is installed along with the version that

$ ~/bin-local/git/bin/git --version

reports is displayed, not any random version of git-add manual page found using default 'man' rules.

> I think my suggestion to use $MANPATH is in line with what he is already
> doing.  If you install things in non-standard places, you can use
> environments to adjust to what you did, and that's the reason PATH and
> MANPATH environments are supported by your tools.

Yes, but provided you have more than one version of git installed, it's inconvenient to tweak both PATH and MANPATH to use one or another. It would be more convenient and consistent if

$ ~/git.old/bin/git help add $ ~/git.new/bin/git help add

were render different versions of git-add manual page, each corresponding to the right version of git.

> Having said that, I do not mind accepting a patch that prepends the
> nonlocal path to MANPATH in help.c::show_man_page().
OK, patch will follow shortly.
-- 
Sergei.
Previous: Luciano Rocha
Message 8 of 8 in “git help error”
  1. Aneesh KumarDec 4, 2007
  2. Junio C HamanoDec 4, 2007
  3. Sergei OrganovDec 4, 2007
  4. Junio C HamanoDec 4, 2007
  5. Luciano RochaDec 4, 2007
  6. David KastrupDec 4, 2007
  7. Luciano RochaDec 4, 2007
  8. Sergei OrganovDec 6, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.