mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Merge pull request #38 from pre-commit/consider_git_no_checkout
Use --no-checkout when cloning (slight performance hack). Closes #28
This commit is contained in:
commit
aae90cf70b
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
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue