summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2017-04-21 10:50:21 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2018-05-03 11:19:41 -0400
commit4aeb61bd31fc934db54c88fec256b71688de4c62 (patch)
treea5bc15bfce97e10529de6c06f36326c594a2b15e
parent607e67a643556234937af69e9b72b2cc8c34b692 (diff)
downloadmongo-4aeb61bd31fc934db54c88fec256b71688de4c62.tar.gz
SERVER-27351 clang_format.py needs to ignore deleted files
(cherry picked from commit 0590b0da70cfdad7edf8d214bbfb5d8d8b6e502e)
-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):