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:
Anthony Sottile 2015-03-25 10:29:41 -07:00
commit c0f5467e25

View file

@ -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: