diff options
author | Brandon Williams <bmwill@google.com> | 2017-08-14 14:30:46 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-14 15:26:22 -0700 |
commit | 2118805b929a47887f2ded218c95a5a274e36aa0 (patch) | |
tree | 3bb4bfb3019049f2e2b8f7fdd08cac1fc2e24069 /Makefile | |
parent | 6134de6ac1819aff8445490dfee3fb29966803c5 (diff) | |
download | git-2118805b929a47887f2ded218c95a5a274e36aa0.tar.gz git-2118805b929a47887f2ded218c95a5a274e36aa0.tar.xz |
Makefile: add style build rule
Add the 'style' build rule which will run git-clang-format on the diff
between HEAD and the current worktree. The result is a diff of
suggested changes.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2440,6 +2440,10 @@ $(SP_OBJ): %.sp: %.c GIT-CFLAGS FORCE .PHONY: sparse $(SP_OBJ) sparse: $(SP_OBJ) +.PHONY: style +style: + git clang-format --style file --diff --extensions c,h + check: common-cmds.h @if sparse; \ then \ |