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>

Brandon Williams committed Aug 14, 2017 at 14:30 UTC 2118805b929a47887f2ded218c95a5a274e36aa0
1 file changed +4
Makefile
+4
@@ -2440,6 +2440,10 @@ $(SP_OBJ): %.sp: %.c GIT-CFLAGS FORCE
2440 .PHONY: sparse $(SP_OBJ)
2441 sparse: $(SP_OBJ)
2442
2443 +.PHONY: style
2444 +style:
2445 + git clang-format --style file --diff --extensions c,h
2446 +
2447 check: common-cmds.h
2448 @if sparse; \
2449 then \