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

Re: [PATCH v3] doc: tweak "man gitcli" for clarity

From
Robert P. J. Day <rpjday@crashcourse.ca>
Date
Nov 24, 2017, 10:39 UTC
Message-ID
<alpine.LFD.2.21.1711240536390.4054@DESKTOP-1GPMCEJ>
In-Reply-To
<xmqqd148p8v4.fsf@gitster.mtv.corp.google.com>
On Fri, 24 Nov 2017, Junio C Hamano wrote:
Show 34 quoted lines
> "Robert P. J. Day" <rpjday@crashcourse.ca> writes:
>
> > -This manual describes the convention used throughout Git CLI.
> > +This manual describes the conventions used throughout Git CLI.
>
> OK.
>
> >  Many commands take revisions (most often "commits", but sometimes
> >  "tree-ish", depending on the context and command) and paths as their
> > @@ -32,32 +32,35 @@ arguments.  Here are the rules:
> >     between the HEAD commit and the work tree as a whole".  You can say
> >     `git diff HEAD --` to ask for the latter.
> >
> > - * Without disambiguating `--`, Git makes a reasonable guess, but errors
> > -   out and asking you to disambiguate when ambiguous.  E.g. if you have a
> > -   file called HEAD in your work tree, `git diff HEAD` is ambiguous, and
> > + * In cases where a Git command is truly ambiguous, Git will error out
> > +   and ask you to disambiguate the command.  E.g. if you have a file
> > +   called HEAD in your work tree, `git diff HEAD` is ambiguous, and
> >     you have to say either `git diff HEAD --` or `git diff -- HEAD` to
> >     disambiguate.
> >  +
> >  When writing a script that is expected to handle random user-input, it is
> >  a good practice to make it explicit which arguments are which by placing
> > -disambiguating `--` at appropriate places.
> > +a disambiguating `--` at appropriate places.
>
> The above "truly" is misleading by giving the information the other
> way around.  We ask to disambiguate when we cannot readily say the
> command line is *not* unambiguous.  That is different from asking
> when we know it is truly ambiguous.
>
> Also see <xmqq7eugqykq.fsf@gitster.mtv.corp.google.com> if you want
> to know more.
  ... snip ...
  at this point, i would throw out *all* of this and, rather than try
to cram disambiguation into the bullet lists currently in that man
page, just break it out into its own section, where it can be
explained properly and comprehensively.
  the reason this has gotten so chaotic is that we're trying to
preserve the structure that is in that man page, when it should just
be tossed and rewritten to give "--" and disambiguation the section it
deserves.
rday
-- 
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
Previous: Junio C Hamano
Message 4 of 4 in “doc: tweak "man gitcli" for clarity”
  1. doc: tweak "man gitcli" for clarityRobert P. J. Day, Nov 22, 2017
  2. Junio C HamanoNov 24, 2017
  3. Junio C HamanoNov 24, 2017
  4. Robert P. J. DayNov 24, 2017

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.