Re: [PATCH] Add test that checkout does not overwrite entries in .git/info/exclude
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Nov 21, 2011, 08:52 UTC
- Message-ID
- <CACsJy8AgDKYhyJ2CD0Y7trGrT63bUuYAS0DadD9khyqEYpguew@mail.gmail.com>
- In-Reply-To
- <7vsjlhhq33.fsf@alter.siamese.dyndns.org>
On Mon, Nov 21, 2011 at 2:50 PM, Junio C Hamano <gitster@pobox.com> wrote:
> If this is a feature, we would like a patch to Documentation/gitignore.txt > as well, I think. Also I have a suspicion that this was an unintended > "regression"; do you have a bisection?
It dated back to f8a9d42 (read-tree: further loosen "working file will be lost" check. - 2006-12-04) when you introduced --exclude-per-directory to read-tree, but not --exclude-from to explicitly add .git/info/exclude. "read tree --exclude-per-directory" is used in git-checkout.sh and the same logic is carried over to builtin-checkout.c until today.
I guess it's time to add "read-tree --exclude-from". Not sure what to do with git-checkout though. We may add an option to checkout to skip either .git/info/exclude or .gitignore, or both.
-- Duy