Re: [RFC] git rm -u
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:55:50
Matthieu Moy [off-list ref] writes:
Junio C Hamano [off-list ref] writes:quoted
But v1.5.2.5~1 (git-add -u paths... now works from subdirectory, 2007-08-16) changed the semantics to limit the operation to the working tree.Not really. It fixed "git add -u path", not plain "git add -u". A quick test checking out and compiling v1.5.2.5~1^ shows that "git add -u ." from a subdirectory was adding everything from the root. My interpretation is that v1.5.2.5~1 fixed an actual bug, without thinking about what would happen when "git add -u" was called without path, so the behavior is "what happens to be the most natural to implement".
I guess at this point it does not matter that much if that was an unintended consequence of a buggy fix, or a new behaviour by design. We initially were tree-wide but later limited the operation to the current directory. I think your "Check 'git diff' then run 'git add -u'" example may be a good enough argument that it is a good idea to restore the originally intended "tree-wide" behaviour in any case.