mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Restore git 1.8 support
This commit is contained in:
parent
179f11bdce
commit
96e9d1b758
10 changed files with 35 additions and 38 deletions
|
|
@ -144,7 +144,7 @@ class Store(object):
|
|||
env = no_git_env()
|
||||
|
||||
def _git_cmd(*args):
|
||||
return cmd_output('git', '-C', directory, *args, env=env)
|
||||
return cmd_output('git', *args, cwd=directory, env=env)
|
||||
|
||||
_git_cmd('clone', '--no-checkout', repo, '.')
|
||||
_git_cmd('reset', ref, '--hard')
|
||||
|
|
@ -163,7 +163,7 @@ class Store(object):
|
|||
|
||||
# initialize the git repository so it looks more like cloned repos
|
||||
def _git_cmd(*args):
|
||||
cmd_output('git', '-C', directory, *args, env=env)
|
||||
cmd_output('git', *args, cwd=directory, env=env)
|
||||
|
||||
_git_cmd('init', '.')
|
||||
_git_cmd('config', 'remote.origin.url', '<<unknown>>')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue