Re: what should "git clean -n -f [-d] [-x] <pattern>" do?
- From
Elijah Newren <newren@gmail.com>
- Date
- Jan 19, 2024, 02:07 UTC
- Message-ID
- <CABPp-BHUVLS4vB5maZzU5gS33ve6LkKgij+rc1bBZges6Xej-g@mail.gmail.com>
- In-Reply-To
- <xmqq34v6gswv.fsf@gitster.g>
On Tue, Jan 9, 2024 at 12:21 PM Junio C Hamano <gitster@pobox.com> wrote:
> > I think the current code makes "-n" take precedence, and ignores > "-f".
:-(
> Shouldn't it either > > (1) error out with "-n and -f cannot be used together", or > (2) let "-n" and "-f" follow the usual "last one wins" rule?
I believe so.
> The latter may be logically cleaner but it is a change that breaks > backward compatibility big time in a more dangerous direction, so it > may not be desirable in practice, with too big a downside for a too > little gain.
Yeah, I think (1) is the safer option, for now. We could potentially do (1), then wait a long time, then switch to (2).