mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Execute with xargs in try_repo
This commit is contained in:
parent
24a2c3d8db
commit
7023caba94
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue