Re: [PATCH v2 2/2] Makefile: add style build rule

2017-08-14 Thread Jeff King
On Mon, Aug 14, 2017 at 04:47:45PM -0700, Junio C Hamano wrote: > > By the way, I do not know which vintage of /usr/bin/git-clang-format > > I happen to have on my box, but I needed a crude workaround patch > > (attached at the end) ... > > I guess you hit the same thing while our messages crossi

Re: [PATCH v2 2/2] Makefile: add style build rule

2017-08-14 Thread Brandon Williams
On 08/14, Junio C Hamano wrote: > Junio C Hamano writes: > > > By the way, I do not know which vintage of /usr/bin/git-clang-format > > I happen to have on my box, but I needed a crude workaround patch > > (attached at the end) ... > > I guess you hit the same thing while our messages crossing ;

Re: [PATCH v2 2/2] Makefile: add style build rule

2017-08-14 Thread Junio C Hamano
Junio C Hamano writes: > By the way, I do not know which vintage of /usr/bin/git-clang-format > I happen to have on my box, but I needed a crude workaround patch > (attached at the end) ... I guess you hit the same thing while our messages crossing ;-) > As to what it does, the first example I

Re: [PATCH v2 2/2] Makefile: add style build rule

2017-08-14 Thread Junio C Hamano
Jeff King writes: > I suspect the "-p" version is going to be the one people invoke the most > often. Should it take the coveted "make style" slot, and the diff get > pushed off to another target? > > I was also confused at first that the "-p" version requires you to stage > the changes first. I

Re: [PATCH v2 2/2] Makefile: add style build rule

2017-08-14 Thread Jeff King
On Mon, Aug 14, 2017 at 03:28:50PM -0700, Stefan Beller wrote: > >> +.PHONY: style > >> +style: > >> + git clang-format --style file --diff --extensions c,h > > > > Did we get "git clang-format" subcommand, or is "s/git //" implied > > somewhere? > > You need to have clang-format installed (d

Re: [PATCH v2 2/2] Makefile: add style build rule

2017-08-14 Thread Stefan Beller
On Mon, Aug 14, 2017 at 3:25 PM, Junio C Hamano wrote: > Brandon Williams writes: > >> 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 >> --- >>

Re: [PATCH v2 2/2] Makefile: add style build rule

2017-08-14 Thread Junio C Hamano
Brandon Williams writes: > 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 > --- > Makefile | 4 > 1 file changed, 4 insertions(+) > > diff --gi

Re: [PATCH v2 2/2] Makefile: add style build rule

2017-08-14 Thread Stefan Beller
On Mon, Aug 14, 2017 at 2:30 PM, Brandon Williams wrote: > 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. Notes from in-office discussion: * 'git clang-format --style file -f --extensio

[PATCH v2 2/2] Makefile: add style build rule

2017-08-14 Thread Brandon Williams
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 --- Makefile | 4 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index ba4359ef8..acfd