mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
Use git_common to call git
In preparation for some Windows optimizations to how git_common calls git it is important to use git_common more widely, specifically from scm.py and gclient_scm.py. This change updates scm.py and gclient_scm.py and updates the associated tests: Test command lines used when updating the tests include: vpython3 tests/gclient_scm_test.py ManagedGitWrapperTestCaseMock.testUpdateConflict vpython3 tests/gclient_scm_test.py GerritChangesTest.testRecoversAfterPatchFailure vpython3 tests/gerrit_util_test.py CookiesAuthenticatorTest.testGetGitcookiesPath Bug: 332982922 Change-Id: I7aacb110b2888c164259815385cd77e26942adc7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5478509 Commit-Queue: Bruce Dawson <brucedawson@chromium.org> Reviewed-by: Gavin Mak <gavinmak@google.com>
This commit is contained in:
@@ -22,6 +22,7 @@ import traceback
|
||||
import gclient_utils
|
||||
import gerrit_util
|
||||
import git_cache
|
||||
import git_common
|
||||
import scm
|
||||
import subprocess2
|
||||
|
||||
@@ -1578,8 +1579,8 @@ class GitWrapper(SCMWrapper):
|
||||
env.setdefault(
|
||||
'GIT_DIR',
|
||||
os.path.abspath(os.path.join(self.checkout_path, '.git')))
|
||||
ret = subprocess2.check_output(['git'] + args, env=env,
|
||||
**kwargs).decode('utf-8')
|
||||
kwargs.setdefault('env', env)
|
||||
ret = git_common.run(*args, **kwargs)
|
||||
if strip:
|
||||
ret = ret.strip()
|
||||
self.Print('Finished running: %s %s' % ('git', ' '.join(args)))
|
||||
|
||||
Reference in New Issue
Block a user