Re: what should "git clean -n -f [-d] [-x] <pattern>" do?
From: Sergey Organov <hidden>
Date: 2024-01-24 08:23:36
Junio C Hamano [off-list ref] writes:
Sergey Organov [off-list ref] writes:quoted
Then how does one figure what "git clean -f -f" will do without actually doing it?I think whoever came up with the bright idea of forcing twice somehow does a totally different thing from forcing once should be shot, twice ;-) It does not mesh well with the idea behind the clean.requireForce setting to make you explicitly choose either '-f' or '-n' to express your intent.
I agree, yet I see it as another deficiency, in addition to that of -n, and I used it as an example to emphasize the deficiency of -n.
I wonder how feasible is it to deprecate that misfeature introduced
with a0f4afbe (clean: require double -f options to nuke nested git
repository and work tree, 2009-06-30) and migrate its users (which
is marked as "This is rarely what the user wants") to a new option,
say, --nested-repo-too so that the "dry-run" version of the
invocations become
git clean -n
git clean -n --nested-repo-too
and you can substitute "-n" with "-f" to actually perform it?Whereas obsoleting second -f in favor of new --nested-repo might be a good idea indeed, I believe it's still a mistake for "dry run" to somehow interfere with -f, sorry. Thanks, -- Sergey Organov