Makefile: add style build rule
[gitweb.git] / Makefile
index 461c845d33cbc5f201096ea4b3e1048492cb0a6a..8e5b2df999b08420c038c05cdc7feb88530a0ab3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -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 \