Skip to content

Conversation

@m-hau
Copy link
Contributor

@m-hau m-hau commented Oct 20, 2025

Optimize the amount of data the pre-commit hook downloads, significantly reducing it from ~600MiB to ~500KiB. This is done by using a Git feature named Partial Clone, which is supported since 2.18 (released 2018). With older Git versions it falls back to the previous behaviour of doing a full clone.

Fixes #3322

m-hau added 3 commits October 20, 2025 16:24
Looks like a copy&paste error from/in 57742db.
Use a partial clone, which is supported in Git since 2.18 (released
2018). The amount of actually downloaded data is roughly equal to the
size of the required files, the compression offsets the git overhead.
@harryajc
Copy link
Collaborator

harryajc commented Nov 1, 2025

@danner26 @DanSheps Thoughts on this?

@harryajc harryajc added the status: gathering feedback Further discussion is needed to determine this issue's scope and/or implementation label Nov 1, 2025
@danner26
Copy link
Member

danner26 commented Nov 2, 2025

@m-hau I will have to dig into this further, but I believe this is just cloning the head commit (i.e. the latest in the branch), is that correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: gathering feedback Further discussion is needed to determine this issue's scope and/or implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimize download amount of PyTest pre-commit check

3 participants