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.