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

Caching directories

From
PRPavel Roskin <proski@gnu.org>
Date
Jan 24, 2006, 04:20 UTC
Message-ID
<1138076423.15105.36.camel@dv>
Hello!

I'm thinking of moving cg-clean functionality to git. After having switched to StGIT, it's the last cogito command I'm still using. I think git can go it much better, since it's a recursive command traversing the whole repository.

To be safe and useful, the new command should distinguish between tracked and untracked directories. Untracked files in tracked directories are usually the first target for cleaning, as they are mostly automatic backups and temporary files. Untracked directories are more likely candidates to be preserved, as they can hold external sources, build output, extensive test data etc.

cg-clean considers a directory untracked if it has no cached files in it. This carries a significant speed penalty, even if not coded in bash.

Maybe it's time to start caching directories in git? I mean, directories corresponding to tree objects could have their stats recorded in the cache. This would allow to distinguish between tracked and untracked directories without scanning them recursively.

-- 
Regards,
Pavel Roskin
Next: Junio C Hamano
Message 1 of 3 in “Caching directories”
  1. Pavel RoskinJan 24, 2006
  2. Junio C HamanoJan 25, 2006
  3. Pavel RoskinJan 25, 2006

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.