From 4aeb61bd31fc934db54c88fec256b71688de4c62 Mon Sep 17 00:00:00 2001 From: Mark Benvenuto Date: Fri, 21 Apr 2017 10:50:21 -0400 Subject: SERVER-27351 clang_format.py needs to ignore deleted files (cherry picked from commit 0590b0da70cfdad7edf8d214bbfb5d8d8b6e502e) --- buildscripts/clang_format.py | 3 +++ 1 file changed, 3 insertions(+) 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): -- cgit v1.2.1