mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-12 20:10:21 -06:00
Use --no-checkout when cloning (slight performance hack). Closes #28
This commit is contained in:
@@ -56,7 +56,7 @@ class Repository(object):
|
||||
# Project already exists, no reason to re-create it
|
||||
return
|
||||
|
||||
local['git']['clone', self.repo_url, self.sha]()
|
||||
local['git']['clone', '--no-checkout', self.repo_url, self.sha]()
|
||||
with self.in_checkout():
|
||||
local['git']['checkout', self.sha]()
|
||||
|
||||
@@ -69,4 +69,4 @@ class Repository(object):
|
||||
def run_hook(self, hook_id, file_args):
|
||||
with self.in_checkout():
|
||||
hook = self.hooks[hook_id]
|
||||
return languages[hook['language']].run_hook(hook, file_args)
|
||||
return languages[hook['language']].run_hook(hook, file_args)
|
||||
|
||||
Reference in New Issue
Block a user