summaryrefslogtreecommitdiff
path: root/buildscripts/clang_format.py
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2016-12-14 13:32:54 -0500
committerMark Benvenuto <mark.benvenuto@mongodb.com>2016-12-14 13:33:07 -0500
commit0590b0da70cfdad7edf8d214bbfb5d8d8b6e502e (patch)
treef398b0e2f5e60fec4b0b36bf2407e802ee9cbec3 /buildscripts/clang_format.py
parent232832a0e79252a29061def2fb89b985f29b78c7 (diff)
downloadmongo-0590b0da70cfdad7edf8d214bbfb5d8d8b6e502e.tar.gz
SERVER-27351 clang_format.py needs to ignore deleted files
Diffstat (limited to 'buildscripts/clang_format.py')
-rwxr-xr-xbuildscripts/clang_format.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/buildscripts/clang_format.py b/buildscripts/clang_format.py
index f25f0941736..86f3dbc055b 100755
--- a/buildscripts/clang_format.py
+++ b/buildscripts/clang_format.py
@@ -529,6 +529,9 @@ class Repo(object):
# Get the full file name here
valid_files = [os.path.normpath(os.path.join(self.root, f)) for f in valid_files]
+ # Filter out files that git thinks exist but were removed.
+ valid_files = [f for f in valid_files if os.path.exists(f)]
+
return valid_files
def is_detached(self):