Use core.quotePath=false when git is listing files
This prevents git from putting quotes around some file names
(those that have astral-plane characters) and not around others.
R=maruel
Bug: 792302
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Change-Id: I3b6a6b36c4720116de811b40177b59aa25c263db
Reviewed-on: https://chromium-review.googlesource.com/815454
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
diff --git a/gclient_scm.py b/gclient_scm.py
index 3dbd64d..20115f6 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -305,7 +305,8 @@
# actually in a broken state here. The index will have both 'a' and 'A',
# but only one of them will exist on the disk. To progress, we delete
# everything that status thinks is modified.
- output = self._Capture(['status', '--porcelain'], strip=False)
+ output = self._Capture([
+ '-c', 'core.quotePath=false', 'status', '--porcelain'], strip=False)
for line in output.splitlines():
# --porcelain (v1) looks like:
# XY filename
@@ -324,7 +325,8 @@
self._Fetch(options, prune=True, quiet=options.verbose)
self._Scrub(revision, options)
if file_list is not None:
- files = self._Capture(['ls-files']).splitlines()
+ files = self._Capture(
+ ['-c', 'core.quotePath=false', 'ls-files']).splitlines()
file_list.extend([os.path.join(self.checkout_path, f) for f in files])
def _DisableHooks(self):
@@ -440,7 +442,8 @@
self._DeleteOrMove(options.force)
self._Clone(revision, url, options)
if file_list is not None:
- files = self._Capture(['ls-files']).splitlines()
+ files = self._Capture(
+ ['-c', 'core.quotePath=false', 'ls-files']).splitlines()
file_list.extend([os.path.join(self.checkout_path, f) for f in files])
if not verbose:
# Make the output a little prettier. It's nice to have some whitespace
@@ -719,7 +722,8 @@
# merge-base by default), so doesn't include untracked files. So we use
# 'git ls-files --directory --others --exclude-standard' here directly.
paths = scm.GIT.Capture(
- ['ls-files', '--directory', '--others', '--exclude-standard'],
+ ['-c', 'core.quotePath=false', 'ls-files',
+ '--directory', '--others', '--exclude-standard'],
self.checkout_path)
for path in (p for p in paths.splitlines() if p.endswith('/')):
full_path = os.path.join(self.checkout_path, path)