Commit ad21b92f authored by jkarlin@chromium.org's avatar jkarlin@chromium.org

Skip deleted files in git cl format

BUG=577647

Review URL: https://codereview.chromium.org/1644973002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298449 0039d316-1c4b-4281-b951-d872f2087c98
parent 29689c68
......@@ -3529,6 +3529,8 @@ def CMDformat(parser, args):
changed_files_cmd = BuildGitDiffCmd('--name-only', upstream_commit, args)
diff_output = RunGit(changed_files_cmd)
diff_files = diff_output.splitlines()
# Filter out files deleted by this CL
diff_files = [x for x in diff_files if os.path.isfile(x)]
clang_diff_files = [x for x in diff_files if MatchingFileType(x, CLANG_EXTS)]
python_diff_files = [x for x in diff_files if MatchingFileType(x, ['.py'])]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment