Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4727922

Browse files
committed
use blobless clone for faster autoupdate
1 parent 5cd99d8 commit 4727922

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

pre_commit/commands/autoupdate.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ def update(self, tags_only: bool, freeze: bool) -> RevInfo:
5050
with tempfile.TemporaryDirectory() as tmp:
5151
git.init_repo(tmp, self.repo)
5252
cmd_output_b(
53-
*git_cmd, 'fetch', 'origin', 'HEAD', '--tags',
53+
*git_cmd, 'config', 'extensions.partialClone', 'true',
54+
cwd=tmp,
55+
)
56+
cmd_output_b(
57+
*git_cmd, 'fetch', 'origin', 'HEAD',
58+
'--quiet', '--filter=blob:none', '--tags',
5459
cwd=tmp,
5560
)
5661

0 commit comments

Comments
 (0)