Fix pulling in patches from git subrepos
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@112765 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/scm.py b/scm.py
index 261cb64..6c6d438 100644
--- a/scm.py
+++ b/scm.py
@@ -102,14 +102,14 @@
['git'] + args, stderr=subprocess2.PIPE, **kwargs)
@staticmethod
- def CaptureStatus(files, upstream_branch=None):
+ def CaptureStatus(cwd, files, upstream_branch=None):
"""Returns git status.
@files can be a string (one file) or a list of files.
Returns an array of (status, file) tuples."""
if upstream_branch is None:
- upstream_branch = GIT.GetUpstreamBranch(os.getcwd())
+ upstream_branch = GIT.GetUpstreamBranch(cwd)
if upstream_branch is None:
raise gclient_utils.Error('Cannot determine upstream branch')
command = ['diff', '--name-status', '-r', '%s...' % upstream_branch]