Index: gclient_scm.py |
diff --git a/gclient_scm.py b/gclient_scm.py |
index 439bc6b116b5bdc1d73f6bc78e8c89bec2892703..8236282af161639ee6d4e194c63dce29f8c4043d 100644 |
--- a/gclient_scm.py |
+++ b/gclient_scm.py |
@@ -589,9 +589,10 @@ class GitWrapper(SCMWrapper): |
return |
else: |
self.Print('Input not recognized') |
- elif re.match("error: Your local changes to '.*' would be " |
- "overwritten by merge. Aborting.\nPlease, commit your " |
- "changes or stash them before you can merge.\n", |
+ elif re.match("error: Your local changes to (')?.*(')? would be " |
+ "overwritten by merge(. Aborting)?[:.]\n(.*\n)?Please, " |
+ "commit your changes or stash them before you can " |
+ "merge.\n", |
e.stderr): |
if not printed_path: |
self.Print('_____ %s%s' % (self.relpath, rev_str), timestamp=False) |
@@ -997,7 +998,7 @@ class GitWrapper(SCMWrapper): |
% (self.relpath, rev_str)) |
try: |
scm.GIT.Capture(['diff-index', '--cached', '--name-status', '-r', |
- '--ignore-submodules', 'HEAD', '--'], |
+ '--ignore-submodules', '--exit-code', 'HEAD', '--'], |
cwd=self.checkout_path) |
except subprocess2.CalledProcessError: |
raise gclient_utils.Error('\n____ %s%s\n' |