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

Re: [PATCH v3] untracked-cache: fix subdirectory handling

From
Duy Nguyen <pclouds@gmail.com>
Date
Aug 19, 2015, 11:39 UTC
Message-ID
<CACsJy8DUUmT0xvBtMiC41qt+f=a02W1F-+i5gWjounNmpLA1tQ@mail.gmail.com>
In-Reply-To
<CACsJy8C=rnqrJHqMBSQcBsD1ihSvztVCnQ46N2mzoeh=HFM6qw@mail.gmail.com>
On Sun, Aug 16, 2015 at 7:16 PM, Duy Nguyen <pclouds@gmail.com> wrote:
Show 14 quoted lines
> On Sun, Aug 16, 2015 at 12:17 PM, David Turner <dturner@twopensource.com> wrote:
>> Previously, some calls lookup_untracked would pass a full path.  But
>> lookup_untracked assumes that the portion of the path up to and
>> including to the untracked_cache_dir has been removed.  So
>> lookup_untracked would be looking in the untracked_cache for 'foo' for
>> 'foo/bar' (instead of just looking for 'bar').  This would cause
>> untracked cache corruption.
>>
>> Instead, treat_directory learns to track the base length of the parent
>> directory, so that only the last path component is passed to
>> lookup_untracked.
>
> Your v2 also fixes untracked_cache_invalidate_path(), which is not
> included here. Maybe it's in another patch?

No I was wrong. Your changes and the original code are effectively the same (I misread strrchr as strchr). But I think there's a bug somewhere as I'm writing tests to understand that code..

-- 
Duy
Previous: Duy NguyenNext: Nguyễn Thái Ngọc Duy
Message 3 of 10 in “untracked-cache: fix subdirectory handling”
  1. untracked-cache: fix subdirectory handlingDavid Turner, Aug 16, 2015
  2. Duy NguyenAug 16, 2015
  3. Duy NguyenAug 19, 2015
  4. 0/3 dt/untracked-subdirNguyễn Thái Ngọc Duy, Aug 19, 2015
  5. 1/3 t7063: use --force-untracked-cache to speed up a bitNguyễn Thái Ngọc Duy, Aug 19, 2015
  6. 2/3 untracked-cache: fix subdirectory handlingNguyễn Thái Ngọc Duy, Aug 19, 2015
  7. 3/3 untracked cache: fix entry invalidationNguyễn Thái Ngọc Duy, Aug 19, 2015
  8. David TurnerAug 25, 2015
  9. Junio C HamanoAug 25, 2015
  10. Junio C HamanoAug 19, 2015

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.