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

Re: [RFC PATCH] checkout: add synonym of -b

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 5, 2018, 00:41 UTC
Message-ID
<xmqq1s80mk36.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20181103191825.15674-1-commonquail@gmail.com>
Mikkel Kjeldsen <commonquail@gmail.com> writes:
Show 14 quoted lines
> Add --new-branch as a long-form synonym of -b. I occasionally encounter
> some confusion in new users having interpreted "checkout -b" to mean
> "checkout branch", or internalized it as "the way to create a new
> branch" rather than merely a convenience for "branch && checkout". I
> think an explicit long-form can help alleviate that.
>
> Signed-off-by: Mikkel Kjeldsen <commonquail@gmail.com>
> ---
>
> Notes:
>     This makes the synopsis and description lines look a little clumsy (and
>     I think incorrect...?) so if this proposal is accepted perhaps those
>     parts are better left out. It is meant more for training and
>     documentation than regular usage, anyway.

Sounds like even you (who wrote this patch) expect the long form option to be impractical for regular usage and everybody would end up using the -b form?

I am borderline "Meh" on this change, slightly on the negative side, primarily because we'd need to worry about what to do with "-B" if we did this to "-b", and I do not think it is worth even spending brain cycles to worry about it (e.g. should it be --force-new-branch? should --new-branch used together with --force a better-looking alternative? if we were to add --force, how should it interact with other existing options the command support? etc.)

But let's hear what others think.
Thanks.
Previous: Mikkel Kjeldsen
Message 2 of 2 in “checkout: add synonym of -b”
  1. checkout: add synonym of -bMikkel Kjeldsen, Nov 3, 2018
  2. Junio C HamanoNov 5, 2018

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.