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

Re: [PATCH v3 2/4] path: optimize common dir checking

From
David Turner <dturner@twopensource.com>
Date
Aug 16, 2015, 05:04 UTC
Message-ID
<loom.20150816T070037-969@post.gmane.org>
In-Reply-To
<CACsJy8BCr7StbtcrgsbTiosTX1RkjwwWyRqddz2XDhFn5R+zAw@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
> On Thu, Aug 13, 2015 at 4:57 AM, David Turner <dturner@twopensource.com> 
wrote:
Show 8 quoted lines
> > Instead of a linear search over common_list to check whether
> > a path is common, use a trie.  The trie search operates on
> > path prefixes, and handles excludes.
> 
> Just be careful that the given key from git_path is not normalized. I
> think you assume it is in the code, but I haven't read carefully. We
> could of course optimize for the good case: assume normalized and
> search, then fall back to explicit normalizing and search again.

What does it mean for a key to be normalized? Do you mean normalized in terms of upper/lowercase on case-insensitive filesystems? If so, I think the assumption here is that this will be called with paths generated by git, which will always use the lowercase path.

Previous: Duy NguyenNext: Duy Nguyen
Message 13 of 24 in “refs: clean up common_list”
  1. 1/4 refs: clean up common_listDavid Turner, Aug 12, 2015
  2. 2/4 path: optimize common dir checkingDavid Turner, Aug 12, 2015
  3. Junio C HamanoAug 12, 2015
  4. Michael HaggertyAug 13, 2015
  5. Junio C HamanoAug 14, 2015
  6. David TurnerAug 14, 2015
  7. Junio C HamanoAug 14, 2015
  8. David TurnerAug 14, 2015
  9. Michael HaggertyAug 15, 2015
  10. Michael HaggertyAug 15, 2015
  11. Junio C HamanoAug 17, 2015
  12. Duy NguyenAug 15, 2015
  13. David TurnerAug 16, 2015
  14. Duy NguyenAug 16, 2015
  15. 3/4 refs: make refs/worktree/* per-worktreeDavid Turner, Aug 12, 2015
  16. Eric SunshineAug 13, 2015
  17. David TurnerAug 13, 2015
  18. Michael HaggertyAug 13, 2015
  19. David TurnerAug 13, 2015
  20. Michael HaggertyAug 14, 2015
  21. Junio C HamanoAug 14, 2015
  22. Duy NguyenAug 15, 2015
  23. 4/4 bisect: make bisection refs per-worktreeDavid Turner, Aug 12, 2015
  24. Duy NguyenAug 15, 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.