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

Re: git checkout -t -B

From
Philip Oakley <philipoakley@iee.org>
Date
Aug 28, 2012, 20:01 UTC
Message-ID
<87A0826508F54AD6A049B71BC5AD8E0A@PhilipOakley>
In-Reply-To
<7vsjb7q5rq.fsf@alter.siamese.dyndns.org>
From: "Junio C Hamano" <gitster@pobox.com>
Sent: Tuesday, August 28, 2012 12:22 AM
Show 6 quoted lines
> "Philip Oakley" <philipoakley@iee.org> writes:
>
>> I searched for all occurrences of '[[' which would indicate a double
>> optional argument within the synopsis and only found git-read-tree.
>
> Double-optional?  That is not an issue.

For clarification, I was picking out the particular case that I saw in the git checkout syntax of an option (which necessarily starts with a first `[` ) which is actually then a multi-choice option, so has a second '[' for that, and then has the required parameter after the closing ']' of the multi-choice, then another ']' after the parameter - hence my 'double optional argument' statement.

It was the multi-choice option, with parameter case that I was looking for, as that multi-choice part would be easy to confuse with the normal list of many options.

Show 20 quoted lines
>
> If an option always takes a parameter, we would have
>
> git cmd [--option parameter]
>
> instead of one of
>
> git cmd [--option]
> git cmd [--option] parameter
> git cmd [--option] parameter...
>
> and if we had
>
> --option::
>        This option distims the parameter ...
>
> that needs to be updated to
>
> --option parameter::
>        This option distims the parameter ...
Agreed.
Philip
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 8 in “git checkout -t -B”
  1. 乙酸鋰Aug 26, 2012
  2. Junio C HamanoAug 26, 2012
  3. Nguyen Thai Ngoc DuyAug 27, 2012
  4. Junio C HamanoAug 27, 2012
  5. Philip OakleyAug 27, 2012
  6. Junio C HamanoAug 27, 2012
  7. Philip OakleyAug 28, 2012
  8. doc: "git checkout -b/-B/--orphan" always takes a branch nameJunio C Hamano, Aug 26, 2012

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.