Today, I accidentally typed man git diff which should give no results, as it should, according to the manual, be interpreted as page diff in section git. However, page git-diff(1) is actually shown. How can that be? (Using man 2.5.7 as included in Ubuntu Lucid)

link|improve this question

78% accept rate
feedback

2 Answers

up vote 6 down vote accepted

man(1) on Ubuntu says:

--no-subpages
              By default, man will try to interpret pairs of manual page names given on the command line as
              equivalent to a single manual page name containing a hyphen.  This supports the  common  pat-
              tern  of  programs  that  implement  a number of subcommands, allowing them to provide manual
              pages for each that can be accessed using similar syntax as would be used to invoke the  sub-
              commands themselves.  For example:

                $ man -aw git diff
                /usr/share/man/man1/git-diff.1.gz

              To disable this behaviour, use the --no-subpages option.

                $ man -aw --no-subpages git diff
                /usr/share/man/man1/git.1.gz
                /usr/share/man/man3/Git.3pm.gz
                /usr/share/man/man1/diff.1.gz
link|improve this answer
That's funny -- they choosed the same example. Thanks! – artistoex May 22 '10 at 11:38
feedback

Git may have a reference for diff in git that points to git-diff.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.