[BUG] 'add -u' doesn't work from untracked subdir
- From
SZEDER Gábor <szeder@ira.uka.de>
- Date
- Sep 2, 2009, 08:03 UTC
- Message-ID
- <20090902080305.GA11549@neumann>
Hi,
As the subject says, 'git add -u' does not work from an untracked subdir, because it doesn't add modified files to the index. The following script reproduces the issue:
mkdir repo cd repo git init echo 1 >foo git add foo git commit -m first echo 2 >foo mkdir untracked_subdir cd untracked_subdir git add -u git diff
It worked in the initial 'git add -u' implementation (dfdac5d, git-add -u: match the index with working tree, 2007-04-20), but 2ed2c222 (git-add -u paths... now works from subdirectory, 2007-08-16) broke it later, and is broken ever since.
Regards, Gábor