threads / discuss / 52683

git subtree cache

Subject: git subtree cache

## tl;dr

One message between Jan 23, 2020 and Jan 23, 2020.

replies: 0people: 1as markdown or json

Tomas Camin· Jan 23, 2020, 14:50 UTC · lore
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
}
```

← back to recent threads