summaryrefslogtreecommitdiff
path: root/check-style.py
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2021-07-13 14:22:43 +0200
committerCarlos Garnacho <carlosg@gnome.org>2021-07-13 14:22:43 +0200
commit01aefaa5a4693cd2f1c15fb52d8b0b1875dc6790 (patch)
treee01504cfeb16d3ef6ee19cfff5fd5d8b6e55dde0 /check-style.py
parent4a5d442b1e43a7acd81257f0f5d7a3e43b6ea635 (diff)
downloadtracker-01aefaa5a4693cd2f1c15fb52d8b0b1875dc6790.tar.gz
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.
Diffstat (limited to 'check-style.py')
-rwxr-xr-xcheck-style.py2
1 files changed, 1 insertions, 1 deletions
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')