mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Use --no-checkout when cloning (slight performance hack). Closes #28
This commit is contained in:
parent
64745fb0b4
commit
c3436ebfda
1 changed files with 2 additions and 2 deletions
|
|
@ -56,7 +56,7 @@ class Repository(object):
|
||||||
# Project already exists, no reason to re-create it
|
# Project already exists, no reason to re-create it
|
||||||
return
|
return
|
||||||
|
|
||||||
local['git']['clone', self.repo_url, self.sha]()
|
local['git']['clone', '--no-checkout', self.repo_url, self.sha]()
|
||||||
with self.in_checkout():
|
with self.in_checkout():
|
||||||
local['git']['checkout', self.sha]()
|
local['git']['checkout', self.sha]()
|
||||||
|
|
||||||
|
|
@ -69,4 +69,4 @@ class Repository(object):
|
||||||
def run_hook(self, hook_id, file_args):
|
def run_hook(self, hook_id, file_args):
|
||||||
with self.in_checkout():
|
with self.in_checkout():
|
||||||
hook = self.hooks[hook_id]
|
hook = self.hooks[hook_id]
|
||||||
return languages[hook['language']].run_hook(hook, file_args)
|
return languages[hook['language']].run_hook(hook, file_args)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue