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

Re: [BUG] git checkout -p HEAD...

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 29, 2020, 16:02 UTC
Message-ID
<xmqqlfgsinb7.fsf@gitster.c.googlers.com>
In-Reply-To
<20200929061830.GA40759@generichostname>
Denton Liu <liu.denton@gmail.com> writes:
Show 6 quoted lines
> So I lean on the side of fully supporting the `...` form for `git
> restore/checkout`. However, I understand if someone wishes to suggest
> "that was never valid to begin with; we should prohibit `...` from
> being used with restore-modes`.
>
> Any opposition to fully supporting the `...` form?

Not from me. The "-p" feature of various commands were bolted on as a mere afterthought and in a rather hacky way. I am not surprised if quality of their implementation differs from that of the primary codepaths. It did not help that they are implemented by diverting the control early to the "add--interactive" machinery from the primary control flow, and it may be a large, if not primary, source of differences in how command line options are handled by the "-p" codepath and the primary codepath in these commands.

Making "-p" behave more like the primary modes of operation in these commands would be a welcome move, I would think. I hope that it got much easier to access the "add--interactive" machinery from C these days; probably it is a good time to make that move.

Thanks.
Previous: Denton Liu
Message 2 of 2 in “[BUG] git checkout -p HEAD...”
  1. Denton LiuSep 29, 2020
  2. Junio C HamanoSep 29, 2020

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.