You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support caching for repository clones and improve hook parsing logic
- Integrated `git2` crate for efficient repository cloning.
- Reworked hook parsing logic to rely solely on `.pre-commit-hooks.yaml` without repo-specific conditions.
- Updated cache directory management for storing cloned repositories efficiently.
- Enhanced test suite to cover cache functionality and hook validation extensively.
- Marked relevant tasks as completed in `plan.md`.
- Updated `.gitignore` to exclude cache directory.
Copy file name to clipboardExpand all lines: docs/plan.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,10 @@ Tasks:
26
26
-[x] Take the best ideas from the pre-commit and lefthook projects and integrate them into rustyhook.
27
27
-[x] ensure all tasks can operate in parallel
28
28
-[x] There is no need for any form of conditional checks when reading the compat repositories. You can instead look at the .pre-commit-hooks.yaml file in the root of each repository and parse it to tell you how to execute the hooks.
29
-
-[ ] The entire concept of how the compat command is working is flawed. It should never need to know anything about any particular repository. It should be able to read the .pre-commit-hooks.yaml file and determine how to execute the hooks.
29
+
-[x] The entire concept of how the compat command is working is flawed. It should never need to know anything about any particular repository. Like "if repo_url.contains("pre-commit/pre-commit-hooks") {" It should be able to read the .pre-commit-hooks.yaml file and determine how to execute the hooks.
30
+
-[x] Make sure that when we are downloading the git repositories for the hooks that they go into our local cache directory instead of tmp.
31
+
-[ ] As part of the doctor command, we should ensure that the cache directory is clean and has been added to the .gitignore file and .dockerignore file if they exist. If they do not suggest to the user that they might want to add them if a .git directory is found and conversely if a Dockerfile is found.
32
+
-[ ] When performing a git clone, you can clone to a 1 level depth to avoid downloading the entire repository history.
30
33
-[ ] We will need some sort of mutex system to ensure that the hooks are not running at the same time on the same file. Perhaps what might work better is to mark the hooks as readers or readers and writers to allow for all readers to execute first and in parallel but the reader/writers can only execute in parallel as long as their file globs do not overlap.
31
34
-[ ] implement an "explain" command that can be used to explain the current configuration and any errors that may have occurred. Perhaps the existing doctor command can be used instead?
32
35
-[ ] use uv to start all python hooks in a separate process
0 commit comments