Re: [PATCH v2 2/2] grep: fix grepping for "intent to add" files
From: Junio C Hamano <hidden>
Date: 2016-06-22 19:17:30
Duy Nguyen [off-list ref] writes:
quoted
quoted
If cached is false and ce_ita() is true and either CE_VALID or CE_SKIP_WORKTREE is set, we would continue to grep an _empty_ SHA-1. But I think we should grep_file() instead, at least for CE_VALID.Yes, that is the breakage I noticed in the patch under discussion and that I wanted to fix in the "I wonder if a better change would be..." version.Heh.. I did guess that. Since neither solution is complete, I'm in favor of Charles's and assume that i-t-a forces to ignore CE_SKIP and CE_SKIP_WORKTREE. I could wait for people to come back complaining, then we know there are real users in very obscure cases and will fix it then.
I said something that can be misunderstood. I meant "I wonder if ..." version is correct. Charles's has the bugs you mentioned and I wanted to fix them by sending the "I wonder if..." version out. But you seem to have misread my statement as "A bug is in my version and I want to fix that bug in my version". That is not what I meant.