Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH 3/4] add -u: only show pathless 'add -u' warning when changes exist outside cwd

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:26

Matthieu Moy [off-list ref] writes:
No time to review the code now. I thought about implementing something
like that, but did not do it because I didn't want the change in the
code to be too big. At some point, we'll have to remove the warning and
it's easier with my version than with yours. But the "damage" to the
code do not seem too big, so that's probably OK and will actually reduce
the pain for some users.
Getting these warnings is a *good* thing.

You may happen to have no changed path outside the current directory
with this particular invocation of "git add -u", or you may do, or
you may not *even* remember if you touched the paths outside.

Training your fingers to type "git add -u ." without having to even
think, is primarily to help the last case.

Squelching of the warning at the top-level is much less problematic
as it is much harder to forget if you are at the top level of the
working tree than forget if you touched paths outside the current
directory.  "I know I am at the top, so I type 'git add -u' without
dot---why do you punish me with the warning?" is a much more valid
complaint.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help