All of lore.kernel.org
 help / color / mirror / Atom feed
* git help error
@ 2007-12-04 16:26 Aneesh Kumar
  2007-12-04 17:55 ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Aneesh Kumar @ 2007-12-04 16:26 UTC (permalink / raw)
  To: Git Mailing List, Junio C Hamano

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/

I guess git-help need to take care of the prefix.

-aneesh

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: git help error
  2007-12-04 16:26 git help error Aneesh Kumar
@ 2007-12-04 17:55 ` Junio C Hamano
  2007-12-04 18:33   ` Sergei Organov
  0 siblings, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2007-12-04 17:55 UTC (permalink / raw)
  To: Aneesh Kumar; +Cc: Git Mailing List, Junio C Hamano

"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/
>
> I guess git-help need to take care of the prefix.

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?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: git help error
  2007-12-04 17:55 ` Junio C Hamano
@ 2007-12-04 18:33   ` Sergei Organov
  2007-12-04 19:40     ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Sergei Organov @ 2007-12-04 18:33 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Aneesh Kumar, Git Mailing List

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/
>>
>> I guess git-help need to take care of the prefix.
>
> 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.

-- 
Sergei.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: git help error
  2007-12-04 18:33   ` Sergei Organov
@ 2007-12-04 19:40     ` Junio C Hamano
  2007-12-04 19:47       ` Luciano Rocha
  2007-12-06 18:36       ` Sergei Organov
  0 siblings, 2 replies; 8+ messages in thread
From: Junio C Hamano @ 2007-12-04 19:40 UTC (permalink / raw)
  To: Sergei Organov; +Cc: Aneesh Kumar, Git Mailing List

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.

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.

Having said that, I do not mind accepting a patch that prepends the
nonlocal path to MANPATH in help.c::show_man_page().

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: git help error
  2007-12-04 19:40     ` Junio C Hamano
@ 2007-12-04 19:47       ` Luciano Rocha
  2007-12-04 19:50         ` David Kastrup
  2007-12-06 18:36       ` Sergei Organov
  1 sibling, 1 reply; 8+ messages in thread
From: Luciano Rocha @ 2007-12-04 19:47 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Sergei Organov, Aneesh Kumar, Git Mailing List

[-- Attachment #1: Type: text/plain, Size: 2112 bytes --]

On Tue, Dec 04, 2007 at 11:40:15AM -0800, Junio C Hamano wrote:
> 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.
> 
> 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.
> 
> Having said that, I do not mind accepting a patch that prepends the
> nonlocal path to MANPATH in help.c::show_man_page().

Actually, current man utilities locate the manual page by looking where
the executable is, if MANPATH isn't defined (tested in Linux and
Darwin).

So, "unset MANPATH; man git-add" should be sufficient.

-- 
lfr
0/0

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: git help error
  2007-12-04 19:47       ` Luciano Rocha
@ 2007-12-04 19:50         ` David Kastrup
  2007-12-04 20:06           ` Luciano Rocha
  0 siblings, 1 reply; 8+ messages in thread
From: David Kastrup @ 2007-12-04 19:50 UTC (permalink / raw)
  To: git

Luciano Rocha <strange@nsk.no-ip.org> writes:

> On Tue, Dec 04, 2007 at 11:40:15AM -0800, Junio C Hamano wrote:
>
>> Having said that, I do not mind accepting a patch that prepends the
>> nonlocal path to MANPATH in help.c::show_man_page().
>
> Actually, current man utilities locate the manual page by looking where
> the executable is, if MANPATH isn't defined (tested in Linux and
> Darwin).
>
> So, "unset MANPATH; man git-add" should be sufficient.

That only works for paths registered in /etc/manpath.config (or an
equivalent config file depending on system/distribution).

-- 
David Kastrup

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: git help error
  2007-12-04 19:50         ` David Kastrup
@ 2007-12-04 20:06           ` Luciano Rocha
  0 siblings, 0 replies; 8+ messages in thread
From: Luciano Rocha @ 2007-12-04 20:06 UTC (permalink / raw)
  To: David Kastrup; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 2133 bytes --]

On Tue, Dec 04, 2007 at 08:50:41PM +0100, David Kastrup wrote:
> Luciano Rocha <strange@nsk.no-ip.org> writes:
> 
> > On Tue, Dec 04, 2007 at 11:40:15AM -0800, Junio C Hamano wrote:
> >
> >> Having said that, I do not mind accepting a patch that prepends the
> >> nonlocal path to MANPATH in help.c::show_man_page().
> >
> > Actually, current man utilities locate the manual page by looking where
> > the executable is, if MANPATH isn't defined (tested in Linux and
> > Darwin).
> >
> > So, "unset MANPATH; man git-add" should be sufficient.
> 
> That only works for paths registered in /etc/manpath.config (or an
> equivalent config file depending on system/distribution).

Err, no. I doubt my ~/opt/noarch/.../...; ~/opt/`uname -i`/git/; etc.,
are pre-registered by my Linux distro or OS X 10.[45].

man man:
       If you specify the -M pathlist option, pathlist  is  a  colon-separated
       list of the directories that man searches.

       If  you  don’t specify -M but set the MANPATH environment variable, the
       value of that  variable  is  the  list  of  the  directories  that  man
       searches.

       If  you  don’t  specify  an  explicit path list with -M or MANPATH, man
       develops its own path list based on the contents of  the  configuration
       file /etc/man.config.  The MANPATH statements in the configuration file
       identify particular directories to include in the search path.
...
       In addition, for each directory in the command search path (we’ll  call
       it  a  "command  directory")  for  which  you do not have a MANPATH_MAP
       statement, man automatically looks for a manual page directory "nearby"
       namely as a subdirectory in the command directory itself or in the par-
       ent directory of the command directory.

So, according to the last paragraph, and assuming no -M argument and no
MANPATH environment variable are defined, man should be able to find the
manual pages for git commands if they're in PATH.

-- 
Luciano Rocha <luciano@eurotux.com>
Eurotux Informática, S.A. <http://www.eurotux.com/>

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: git help error
  2007-12-04 19:40     ` Junio C Hamano
  2007-12-04 19:47       ` Luciano Rocha
@ 2007-12-06 18:36       ` Sergei Organov
  1 sibling, 0 replies; 8+ messages in thread
From: Sergei Organov @ 2007-12-06 18:36 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Aneesh Kumar, Git Mailing List

Junio C Hamano <gitster@pobox.com> writes:

> 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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-12-06 18:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-04 16:26 git help error Aneesh Kumar
2007-12-04 17:55 ` Junio C Hamano
2007-12-04 18:33   ` Sergei Organov
2007-12-04 19:40     ` Junio C Hamano
2007-12-04 19:47       ` Luciano Rocha
2007-12-04 19:50         ` David Kastrup
2007-12-04 20:06           ` Luciano Rocha
2007-12-06 18:36       ` Sergei Organov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.