mirror of
https://github.com/oskar456/dzonegit.git
synced 2024-05-11 05:55:41 +00:00
Fix whitespace check
This commit is contained in:
@ -52,10 +52,12 @@ def get_head():
|
|||||||
def check_whitespace_errors(against):
|
def check_whitespace_errors(against):
|
||||||
r = subprocess.run(
|
r = subprocess.run(
|
||||||
["git", "diff-index", "--check", "--cached", against],
|
["git", "diff-index", "--check", "--cached", against],
|
||||||
stderr=subprocess.PIPE
|
stdout=subprocess.PIPE,
|
||||||
|
stderr=subprocess.STDOUT,
|
||||||
|
encoding="utf-8",
|
||||||
)
|
)
|
||||||
if r.returncode != 0:
|
if r.returncode != 0:
|
||||||
raise HookException("Whitespace errors", r.stderr)
|
raise HookException("Whitespace errors", stderr=r.stdout)
|
||||||
|
|
||||||
|
|
||||||
def get_file_contents(path, revision=""):
|
def get_file_contents(path, revision=""):
|
||||||
|
Reference in New Issue
Block a user