mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-18 00:24:47 +04:00
Merge pull request #215 from pre-commit/reset_instead_of_checkout
Use reset instead of checkout when checking out hook repo
This commit is contained in:
commit
c0f5467e25
1 changed files with 1 additions and 1 deletions
|
|
@ -116,7 +116,7 @@ class Store(object):
|
|||
with clean_path_on_failure(dir):
|
||||
cmd_output('git', 'clone', '--no-checkout', url, dir)
|
||||
with cwd(dir):
|
||||
cmd_output('git', 'checkout', sha)
|
||||
cmd_output('git', 'reset', sha, '--hard')
|
||||
|
||||
# Update our db with the created repo
|
||||
with sqlite3.connect(self.db_path) as db:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue