commercialhaskell/stack

Optionally cache Git object files in Pantry directory

Open

#4 758 ouverte le 21 avr. 2019

Voir sur GitHub
 (2 commentaires) (1 réaction) (0 assignés)Haskell (848 forks)batch import
help wantednewcomer friendlytype: discusstype: enhancementtype: performance

Métriques du dépôt

Stars
 (4 060 stars)
Métriques de merge PR
 (Merge moyen 14h 21m) (12 PRs mergées en 30 j)

Description

Setting milestone to P1 to ensure we decide on this before the Stack 2.0 release.

I was unaware until recently of the GIT_OBJECT_DIRECTORY environment variable, described at https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables. IIUC, we can set this environment variable to a shared directory inside the pantry directory, and cache repository information across usages.

Advantages:

  • Don't need to reclone the entire history of a repo when switching to a slightly later commit
  • The current inefficiency of using multiple subdirectories from a single repo will mostly disappear

Disadvantages:

  • Adds lots of additional storage

The disadvantage can be addressed with a future feature of some gc command to Stack, which is actually the topic of a likely GSoC project.

CC @borsboom and @qrilka for feedback.

Guide contributeur