From 01aefaa5a4693cd2f1c15fb52d8b0b1875dc6790 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Tue, 13 Jul 2021 14:22:43 +0200 Subject: check-style: Remove all context from diffs This avoids setting the uncrustify on/off code comments in the middle of surrounding code, and maybe breaking their style on the way. Reducing the context to 0 ensures these are right at the start and end lines of the function. --- check-style.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'check-style.py') diff --git a/check-style.py b/check-style.py index df2ae4651..a4cf85612 100755 --- a/check-style.py +++ b/check-style.py @@ -8,7 +8,7 @@ import sys import tempfile def run_diff(sha): - proc = subprocess.Popen(["git", "diff", "--function-context", sha, "HEAD"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + proc = subprocess.Popen(["git", "diff", "-U0", "--function-context", sha, "HEAD"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) files = proc.stdout.read().strip().decode('utf-8') return files.split('\n') -- cgit v1.2.1