From: Brandon Williams Date: Mon, 14 Aug 2017 21:30:46 +0000 (-0700) Subject: Makefile: add style build rule X-Git-Tag: v2.15.0-rc0~62^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2118805b929a47887f2ded218c95a5a274e36aa0;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/Makefile b/Makefile index 461c845d33..8e5b2df999 100644 --- 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 \