Re: [RFC] git rm -u
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 21, 2013, 23:18 UTC
- Message-ID
- <7vbocif7md.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <vpqhamapal1.fsf@grenoble-inp.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 14 quoted lines
> Junio C Hamano <gitster@pobox.com> writes: > >> 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.