mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-13 20:40:08 -06:00
Execute with xargs in try_repo
This commit is contained in:
@@ -15,6 +15,7 @@ from pre_commit.commands.run import run
|
||||
from pre_commit.store import Store
|
||||
from pre_commit.util import cmd_output
|
||||
from pre_commit.util import tmpdir
|
||||
from pre_commit.xargs import xargs
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -39,7 +40,7 @@ def _repo_ref(tmpdir, repo, ref):
|
||||
|
||||
staged_files = git.get_staged_files(cwd=repo)
|
||||
if staged_files:
|
||||
cmd_output('git', 'add', *staged_files, cwd=repo, env=env)
|
||||
xargs(('git', 'add', '--'), staged_files, cwd=repo, env=env)
|
||||
|
||||
cmd_output('git', 'add', '-u', cwd=repo, env=env)
|
||||
git.commit(repo=shadow)
|
||||
|
||||
Reference in New Issue
Block a user