From d793438cf4fc090f484df7b00f42096c2983cbfb Mon Sep 17 00:00:00 2001 From: David Vo Date: Tue, 10 Oct 2023 02:21:47 +1100 Subject: [PATCH] [wpiformat] Make changed file list ignore upstream changes (#259) The changed file detection now compares HEAD against the merge base of HEAD and main instead of main. --- wpiformat/wpiformat/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpiformat/wpiformat/__init__.py b/wpiformat/wpiformat/__init__.py index 16fb4ef..f84b6fe 100644 --- a/wpiformat/wpiformat/__init__.py +++ b/wpiformat/wpiformat/__init__.py @@ -436,7 +436,7 @@ def main(): # Create list of all changed files output_list = subprocess.check_output( - ["git", "diff", "--name-only", main_branch], encoding="ascii" + ["git", "diff", "--name-only", f"{main_branch}..."], encoding="ascii" ).split() changed_file_list = [root_path + os.sep + line.strip() for line in output_list]