Suggestion for faster "clones" #2524
George-Ogden
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi
I love the fact that
prekis much faster thanpre-commit, especially for the first-time setup.However, when autoupdating (and updating to a new version), it seems redundant to reclone the repo. Instead, it could use an approach similar to Mirror|rorriM (but implemented in Rust instead of Python).
The idea is to split the repository cache into two sections:
Any "clone" can then be split into two parts:
git fetch) the copy of the repo in the unversioned cache from the upstreamThis will be significantly faster, as it will only have to fetch commits since the last update, not the entire repo.
The major drawbacks are the implementation complexity (this may create race conditions if not handled correctly) and cache size (the repo is store locally an extra time for each usage).
I would be interested to implement this myself if that is something you would be happy for. However, I wanted to check whether it's something that you would like to add (as it is has a considerable implementation). I have only implemented a Linux version in the past, but with sufficient testing, I think I could safely do a very similar version with Windows concurrency primitives.
All reactions