From: Junio C Hamano Date: Mon, 02 May 2011 00:02:26 GMT Subject: Re: [PATCH] Add --info-path and --man-path options to git. Message-ID: <7v62puq8a5.fsf@alter.siamese.dyndns.org> In-Reply-To: <20110501234833.GC11550@elie> Jonathan Nieder writes: > By contrast, man and info typically use standard search mechanisms: > man using $MANPATH and info using the dir.info file. The usual > interface to git's documentation through a man browser is not > > man /usr/share/man/man1/git-add.1.gz > > but > > man git-add; # or "man git add" if your man viewer supports it I think you are forgetting the case where the git-man-path the user uses to install git may be outside /usr/share/man (e.g. $HOME/share/man). In such an installation, by setting $PATH to include your installed git binary (e.g. $HOME/bin), you should be able to say "git help -m git" to tell help.c to internally prepend $HOME/share/man to the $MANPATH before it kicks "man". Does "man git-add" work without you knowing where that directory is (iow, without having $HOME/share/man on $MANPATH)? And if it does not, how would you learn what directory to add to your $MANPATH? Isn't that what this patch is solving? I am not sure where the similarity with the html documentation breaks donw. The same thing for info.