git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Christian Couder <christian.couder@gmail.com>
To: Fredrik Gustafsson <iveqy@iveqy.com>
Cc: Andrew Johnson <ajohnson388@gmail.com>, git <git@vger.kernel.org>
Subject: Re: Why are there multiple ways to get the manual in Git?
Date: Sat, 17 Sep 2016 21:21:48 +0200	[thread overview]
Message-ID: <CAP8UFD3TPeqY_O-Rc0rvLMO=XVxRMTMwq3gftpnx5LJh6WOZ1A@mail.gmail.com> (raw)
In-Reply-To: <20160917183919.GJ20666@paksenarrion.iveqy.com>

On Sat, Sep 17, 2016 at 8:39 PM, Fredrik Gustafsson <iveqy@iveqy.com> wrote:
> 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.

Maybe it will be easier to understand if you try:

$ git help help

or

$ git help --help

or

$ man git-help

:-)

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

(It should be "git-<verb>" above.)

> does not work and
>
> $ git help <verb>
>
> opens a webbrowser instead of a man page.

Yeah, it is one of the reasons.
There are systems where "man" is not the standard ways to get help,
and text on the command line is not the prefered format for help
content.
So the "git help" command has different default depending on the OS to
better suit user expectations on each OS.
This way people can just be teached to use "git help" and that will do
something sensible everywhere.

> Using a unix system I would
> however assume that
>
> $ man git <verb>

(Again it should be "git-<verb>" above.)

> would work since it's the standard way of getting help on those systems.

Yeah, so we need that to work to make people happy on unix systems.

Another reason is that "git help" provides more configurability and
more features like its -a and -g options.
It could provide even more in the future, like options to search in
the documentation.

  parent reply	other threads:[~2016-09-17 19:21 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
2016-09-17 19:21   ` Christian Couder [this message]
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='CAP8UFD3TPeqY_O-Rc0rvLMO=XVxRMTMwq3gftpnx5LJh6WOZ1A@mail.gmail.com' \
    --to=christian.couder@gmail.com \
    --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).