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>2017-04-21 10:50:21 -0400
commit6b4ed4753d7cb49b610ae9a8a68a91ed4560cf93 (patch)
treeb877e9db6782f49cd884132cc9b1815dc751017b
parentdf95d69472a02431fe299ea901ae5a5b789c41f5 (diff)
downloadmongo-6b4ed4753d7cb49b610ae9a8a68a91ed4560cf93.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 2cc998352f2..99c3e9cf849 100755
--- a/buildscripts/clang_format.py
+++ b/buildscripts/clang_format.py
@@ -492,6 +492,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 get_files_to_check_working_tree():