Better error checking in git freeze

R=iannucci@chromium.org
BUG=567157

Review-Url: https://codereview.chromium.org/1527403002
diff --git a/git_common.py b/git_common.py
index 03d99ee..9ccbbc3 100644
--- a/git_common.py
+++ b/git_common.py
@@ -431,15 +431,24 @@
   except subprocess2.CalledProcessError:
     pass
 
+  add_errors = False
   try:
-    run('add', '-A')
+    run('add', '-A', '--ignore-errors')
+  except subprocess2.CalledProcessError:
+    add_errors = True
+
+  try:
     run('commit', '--no-verify', '-m', FREEZE + '.unindexed')
     took_action = True
   except subprocess2.CalledProcessError:
     pass
 
+  ret = []
+  if add_errors:
+    ret.append('Failed to index some unindexed files.')
   if not took_action:
-    return 'Nothing to freeze.'
+    ret.append('Nothing to freeze.')
+  return ' '.join(ret) or None
 
 
 def get_branch_tree():