Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 2/4] add -u: get rid of "treewideupdate" configuration

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:00

Nguyen Thai Ngoc Duy [off-list ref] writes:
On Sat, Apr 9, 2011 at 11:56 AM, Junio C Hamano [off-list ref] wrote:
quoted
... If you rewrite the verify_filename() in the
way I outlined above, you wouldn't have to.
I considered that, but we may need to go through the whole worktree
just to verify "*.c" matches something.
You are absolutely right.  After all, this is only meant to be a quick
sanity check to ensure that we got the user's intention absolutely right
when the user did not disambiguate with '--'.  When we see all earlier
ones are object names (and cannot be filenames) and all later ones have
working tree entries (and cannot be object names), we are sure that we got
the missing '--' boundary right.

And we error out when there is any doubt, and that is a good feature.
Even when there is no glob involved, e.g. "git log builtin-add.c", we fail
the parsing, because there is no builtin-add.c in the filesystem in
today's checkou.  That behaviour is coming exactly from that reasoning: we
may be sure that "builtin-add.c" cannot be an object name, but we don't
know if it is a typo of builtin/add.c (or builtin-add.o, etc.), and we
don't want to make the user wait while we are guessing.

So let's forget about the suggestion.  Thanks for injecting sanity to the
discussion and stopping me from going overboard.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help