git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Denton Liu <liu.denton@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [BUG] git checkout -p HEAD...
Date: Tue, 29 Sep 2020 09:02:04 -0700	[thread overview]
Message-ID: <xmqqlfgsinb7.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20200929061830.GA40759@generichostname> (Denton Liu's message of "Mon, 28 Sep 2020 23:18:30 -0700")

Denton Liu <liu.denton@gmail.com> writes:

> 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.

      reply	other threads:[~2020-09-29 16:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29  6:18 Denton Liu
2020-09-29 16:02 ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqlfgsinb7.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=liu.denton@gmail.com \
    --subject='Re: [BUG] git checkout -p HEAD...' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).