1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-07 10:26:08 +02:00

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>
This commit is contained in:
Brandon Williams 2017-08-14 14:30:46 -07:00 committed by Junio C Hamano
parent 6134de6ac1
commit 2118805b92

View File

@ -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 \