git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git glossary --help ?

From
Philip Oakley <philipoakley@iee.org>
Date
Apr 7, 2019, 22:42 UTC
Message-ID
<3de9d8bc-f9d1-bf09-def6-71e5ed418225@iee.org>
In-Reply-To
<xmqqlg0mc4mk.fsf@gitster-ct.c.googlers.com>
Hi Junio,
On 07/04/2019 14:43, Junio C Hamano wrote:
Show 29 quoted lines
> Duy Nguyen <pclouds@gmail.com> writes:
>
>> Phew... I didn't break anything!
>>
>> That behavior has been gone since 2c6b6d9f7d (help: make option --help
>> open man pages only for Git commands, 2016-08-26). Ralf did not
>> mention why he thought "git <concept> --help" was a bad idea. But it
>> was considered a bug by Junio [1]
>>
>> [1] https://public-inbox.org/git/CAPc5daXicjUDi6B-MA8Sn=_UZ_jHvc8SE4ZXt2dHbbDQkD7=WA@mail.gmail.com/
> I do not think you are reading me correctly.
>
> Yes, I do consider that "git foo --help" that does not say "there is
> no subcomand 'foo' in Git suite" is a bug.  But that is only for
> 'foo' that is clearly meant as a command.
>
> I do not imagine anybody labelling "git help glossary" as a bug.
>
> I am fairly neutral about "git glossary --help".  I personally would
> not ask git like so, as "glossary" is clearly not a command name,
> and the "--help" option is clearly meant as an option to the
> subcommand, which means that the request logically does not make
> much sense.
>
> But unlike "git foo --help", if the word that ought to name a
> subcommand instead names a known concept, e.g. "glossary", I do not
> think it is too bad if we DWIMmed what the user meant to say,
> i.e. turning "git glossary --help" into "git help glossary".
>

Given the earlier report that started the thread Duy linked, I guess there will need to be a balance between the two expectations.

The DWIMming  may need to both report that it's not a command, but then offer the concept guide as the primary target if correct, or perhaps as one of the alternate "commands" if closely named to a guide (e.g. revisions vs revision).

One of the issues back then was the lack of a complete list of 'guides' to check against, so the badly spelt command logic wasn't brought into play. -- Philip

Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 8 in “git glossary --help ?”
  1. Philip OakleyApr 6, 2019
  2. Andreas SchwabApr 6, 2019
  3. Philip OakleyApr 6, 2019
  4. Duy NguyenApr 7, 2019
  5. Philip OakleyApr 7, 2019
  6. Junio C HamanoApr 7, 2019
  7. Philip OakleyApr 7, 2019
  8. Junio C HamanoApr 8, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.