git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/5] grep: skip files outside sparse checkout area

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Aug 4, 2009, 13:14 UTC
Message-ID
<fcaeb9bf0908040614r6c1ba65dw98c63a48b82df0aa@mail.gmail.com>
In-Reply-To
<7vljm4st0w.fsf@alter.siamese.dyndns.org>
2009/7/31 Junio C Hamano <gitster@pobox.com>:
Show 18 quoted lines
>> @@ -522,8 +524,11 @@ static int grep_cache(struct grep_opt *opt, const char **paths, int cached,
>>                               continue;
>>                       hit |= grep_sha1(opt, ce->sha1, ce->name, 0);
>>               }
>> -             else
>> +             else {
>> +                     if (ce->ce_flags & CE_VALID)
>> +                             continue;
>>                       hit |= grep_file(opt, ce->name);
>> +             }
>>               if (ce_stage(ce)) {
>>                       do {
>>                               nr++;
>
> I do not think the new code in this hunk will be reached as the other arm
> of the "else" greps in the index when CE_VALID is set.
>
> Has this series been tested or self-reviewed yet?

Yes and no. It had been tested and self-reviewed back when it was part of original series. There the new code was CE_NO_CHECKOUT check, not CE_VALID. I grepped through and replaced with CE_VALID to form a new draft in order to get comments about this direction, this time it was not well tested because my focus was in the last patch.

-- 
Duy
Previous: Junio C HamanoNext: Junio C Hamano
Message 12 of 15 in “Sparse checkout resurrection”
  1. 0/5 Sparse checkout resurrectionNguyễn Thái Ngọc Duy, Jul 29, 2009
  2. 1/5 Prevent diff machinery from examining worktree outside sparse checkoutNguyễn Thái Ngọc Duy, Jul 29, 2009
  3. 2/5 grep: skip files outside sparse checkout areaNguyễn Thái Ngọc Duy, Jul 29, 2009
  4. 3/5 gitignore: read from index if .gitignore is not in worktreeNguyễn Thái Ngọc Duy, Jul 29, 2009
  5. 4/5 unpack_trees(): keep track of unmerged entriesNguyễn Thái Ngọc Duy, Jul 29, 2009
  6. 5/5 unpack_trees(): add support for sparse checkoutNguyễn Thái Ngọc Duy, Jul 29, 2009
  7. Jakub NarebskiJul 29, 2009
  8. Nguyen Thai Ngoc DuyJul 29, 2009
  9. Jakub NarebskiJul 30, 2009
  10. Junio C HamanoJul 31, 2009
  11. Junio C HamanoJul 31, 2009
  12. Nguyen Thai Ngoc DuyAug 4, 2009
  13. Junio C HamanoJul 31, 2009
  14. skillzero@gmail.comJul 31, 2009
  15. Nguyen Thai Ngoc DuyAug 4, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.