t5403.1 and adding a file that belongs to a submodule
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Jul 19, 2011, 13:57 UTC
- Message-ID
- <CACsJy8AKMQa2u6Y5qQHGujbjqq0qnM5D1+aEvcfk7POxQBqsVg@mail.gmail.com>
A part of t5403.1 is like this
touch a b; git commit -am1 git clone ./. clone2 GIT_DIR=clone2/.git git add clone2/b
The last command troubles me because clone2/.git is valid, I don't think it should add "clone2/b" to clone2/.git/index. This is likely due to common prefix optimization in read_directory, where it skips checking .git at the first level (clone2). If we turn that command to "git add a clone2/b" (common prefix would be ""), the second argument is silently dropped (seems like a bug to me). Should t5403.1 be rewritten to avoid that construct?
-- Duy