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

Skip to content

Commit aae90cf

Browse files
committed
Merge pull request #38 from pre-commit/consider_git_no_checkout
Use --no-checkout when cloning (slight performance hack). Closes #28
2 parents 64745fb + c3436eb commit aae90cf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pre_commit/repository.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def create(self):
5656
# Project already exists, no reason to re-create it
5757
return
5858

59-
local['git']['clone', self.repo_url, self.sha]()
59+
local['git']['clone', '--no-checkout', self.repo_url, self.sha]()
6060
with self.in_checkout():
6161
local['git']['checkout', self.sha]()
6262

@@ -69,4 +69,4 @@ def install(self):
6969
def run_hook(self, hook_id, file_args):
7070
with self.in_checkout():
7171
hook = self.hooks[hook_id]
72-
return languages[hook['language']].run_hook(hook, file_args)
72+
return languages[hook['language']].run_hook(hook, file_args)

0 commit comments

Comments
 (0)