From: "Philip Oakley" <philipoakley@iee.org>
To: "Fredrik Gustafsson" <iveqy@iveqy.com>,
"Andrew Johnson" <ajohnson388@gmail.com>
Cc: <git@vger.kernel.org>
Subject: Re: Why are there multiple ways to get the manual in Git?
Date: Sat, 17 Sep 2016 20:12:01 +0100 [thread overview]
Message-ID: <0B172DDC12B24525AF5FCEC4216B69E3@PhilipOakley> (raw)
In-Reply-To: 20160917183919.GJ20666@paksenarrion.iveqy.com
From: "Fredrik Gustafsson" <iveqy@iveqy.com>
> On Sat, Sep 17, 2016 at 01:47:52PM -0400, Andrew Johnson wrote:
>> $ git help <verb>
>> $ git <verb> --help
>> $ man git-<verb>
>>
>> I tested all three to confirm they were equivalent.
It is (IIUC) in a general sort of way "by design", and a little bit of
accident.
>
> While I'm not able to answer your question, I can shred a little light
> about them not being equal. For example using a windows machine
>
> $ man git <verb>
>
> does not work and
>
> $ git help <verb>
>
> opens a webbrowser instead of a man page. Using a unix system I would
> however assume that
>
> $ man git <verb>
>
> would work since it's the standard way of getting help on those systems.
>
> --
Historically git was a set of shell scripts named git-*, so each stood
alone.
Then there was the great consolidation (around V1.6?) which created the
modern `git <cmd>' approach, with every command normally having -h
and --help options for short form usage and long form man pages.
The option capability became standardised. Also a `git help <cmd>` command
was created. Underneath there are still the (backward compatible) git-*
forms. The help command allowed selection of display type, so that on
Unix/Linux man was the norm, while an --html (or --web) option is available
for those who like the pretty browser view
The help commnad just converts the parameters to achieve the expected
display (with various fallbacks if the command or guide is missing, etc)
Meanwhile on Windows, the man facility was not ported as part of git, so it
defaults to the --web version. If you are on Windows, and download the SDK
as well you can install the man viewer and other goodies
--
Philip
next prev parent reply other threads:[~2016-09-17 19:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-17 17:47 Why are there multiple ways to get the manual in Git? Andrew Johnson
2016-09-17 18:39 ` Fredrik Gustafsson
2016-09-17 19:12 ` Philip Oakley [this message]
2016-09-17 19:21 ` Christian Couder
2016-09-18 10:21 ` Jakub Narębski
2016-09-18 10:51 ` Philip Oakley
2016-09-19 15:59 ` Junio C Hamano
2016-09-19 16:22 ` Philip Oakley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0B172DDC12B24525AF5FCEC4216B69E3@PhilipOakley \
--to=philipoakley@iee.org \
--cc=ajohnson388@gmail.com \
--cc=git@vger.kernel.org \
--cc=iveqy@iveqy.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).