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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2009-01-01, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>  * 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...]

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux