When -u was introduced in dfdac5d (git-add -u: match the index with
working tree., 2007-04-20), "add -u" (without pathspec) added
everything. Shortly after, 2ed2c22 (git-add -u paths... now works from
subdirectory, 2007-08-16) broke it while fixing something related.
This makes -u and -A inconsistent with some other options, namely -p.
It's been four years since the unintentional breakage and people are
probably used to "git add -u" updating only current directory.
Let's plan in 1.8.0 to change its behaviour in such a way that does
not hurt existing users too badly during the transition period.
- A new add.treewideupdate configuration variable can be set to
"true" to make "add -u/-A" that is ran without any pathspec from
a subdirectory to affect the whole tree. When the variable is
set to "false", the operation is limited to the current working
directory.
- Missing configuration variable means the same thing as setting it
to "false" for now, but the user will be given a warning about
the transition plan, and an advise to either set the variable or
to say "."
- In 1.8.0, the warning message needs to be rephrased, the added
test needs to be updated, and the default value for the variable
needs to be flipped to "true". In a few releases after that, we
would remove the warning message.
Signed-off-by: Junio C Hamano <gitster@pobox.com>