mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 09:04:41 +04:00
Merge pull request #2859 from pre-commit/blobless-clone
use blobless clone for faster autoupdate
This commit is contained in:
commit
148df0d718
1 changed files with 6 additions and 1 deletions
|
|
@ -50,7 +50,12 @@ class RevInfo(NamedTuple):
|
||||||
with tempfile.TemporaryDirectory() as tmp:
|
with tempfile.TemporaryDirectory() as tmp:
|
||||||
git.init_repo(tmp, self.repo)
|
git.init_repo(tmp, self.repo)
|
||||||
cmd_output_b(
|
cmd_output_b(
|
||||||
*git_cmd, 'fetch', 'origin', 'HEAD', '--tags',
|
*git_cmd, 'config', 'extensions.partialClone', 'true',
|
||||||
|
cwd=tmp,
|
||||||
|
)
|
||||||
|
cmd_output_b(
|
||||||
|
*git_cmd, 'fetch', 'origin', 'HEAD',
|
||||||
|
'--quiet', '--filter=blob:none', '--tags',
|
||||||
cwd=tmp,
|
cwd=tmp,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue