summaryrefslogtreecommitdiff
path: root/.git-hooks
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-02-09 09:17:58 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-02-09 13:06:17 +0100
commit5f5f0937544e135891a008273eb7a44aac7f0c5b (patch)
tree9b23e331a9d77cc490fc5209c6197772068f3994 /.git-hooks
parent4b938c558d004537cf73ca4319019ff64f052270 (diff)
clang-format: improve error message when CI fails
Don't just tell the problem but hint how to fix it. Change-Id: I9d079ee7d4ed61266e22a3fa21efe10366724645 Reviewed-on: https://gerrit.libreoffice.org/49471 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to '.git-hooks')
-rwxr-xr-x.git-hooks/pre-commit2
1 files changed, 2 insertions, 0 deletions
diff --git a/.git-hooks/pre-commit b/.git-hooks/pre-commit
index 8c4e86345aa1..5ab539466827 100755
--- a/.git-hooks/pre-commit
+++ b/.git-hooks/pre-commit
@@ -204,6 +204,8 @@ sub check_style($)
print("and the clang-format rules. Fixing these now automatically.\n");
print("Running '$clang_format -i " . join(" ", @bad_names) . "' for you...\n");
system("$clang_format -i " . join(" ", @bad_names));
+ # TODO this stages all local modifications, staging originally
+ # unstaged hunks.
system("git add " . join(" ", @bad_names));
print("Done.\n");
}