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

Re: [PATCH] Documentation/git-merge: at least one <remote> not two

From
Sitaram Chamarty <sitaramc@gmail.com>
Date
Jan 2, 2009, 00:25 UTC
Message-ID
<slrnglqnnu.tht.sitaramc@sitaramc.homelinux.net>
In-Reply-To
<7vk59ehg7l.fsf@gitster.siamese.dyndns.org>
On 2009-01-01, Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
>  * Is it a good idea to standardize on "one or more" semantics?  I suspect
>    we would rather want to standardize on "zero or more", because it would
>    be more natural to say:
>
>     $ git diff [--] <paths>...
>
>    to mean "You can give paths if you want to but you do not have to".  If
>    ellipses meant "one or more", you have to say this instead:
>
>     $ git diff [--] [<paths>...]

For what it is worth, I have always understood "..." to mean "more of the preceding", meaning "one or more". That is your first example above.

Zero or more is your second syntax above, because the whole thing is in brackets, and hence completely optional.

In regex terms (to me anyway):

a? == [a] a+ == a... a* == [a...]

Previous: Junio C Hamano
Message 3 of 3 in “Documentation/git-merge: at least one <remote> not two”
  1. Documentation/git-merge: at least one <remote> not twojidanni@jidanni.org, Jan 1, 2009
  2. Junio C HamanoJan 1, 2009
  3. Sitaram ChamartyJan 2, 2009

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.