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

git subtree cache

From
TCTomas Camin <t.camin@gmail.com>
Date
Jan 23, 2020, 14:50 UTC
Message-ID
<CANKW80qZ_Fa-h5eQaVhstdyB2cOSTqZQyt9jGtfRuvLnwTCWmA@mail.gmail.com>
Hi,

I noticed an unexpected behaviour with the cache folder used by git subtree split.

In the cache_setup function a cachedir folder is created and named after the pid of the process, however I don't see that folder being deleted anywhere in the script.

As is I'm seeing the number of cache files constantly growing as new cache folders are created when using split.

Is this an expected behaviour?

Regards, Tomas

```
cache_setup () {
   cachedir="$GIT_DIR/subtree-cache/$$"
   rm -rf "$cachedir" ||
      die "Can't delete old cachedir: $cachedir"
   mkdir -p "$cachedir" ||
      die "Can't create new cachedir: $cachedir"
   mkdir -p "$cachedir/notree" ||
      die "Can't create new cachedir: $cachedir/notree"
   debug "Using cachedir: $cachedir" >&2
}
```
Message 1 of 1 in “git subtree cache”
  1. Tomas CaminJan 23, 2020

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.