Re: [RFC PATCH v2 1/2] Makefile: add check-headers target

2014-09-10 Thread Matthieu Moy
Junio C Hamano writes: > David Aguilar writes: > >> On Mon, Sep 08, 2014 at 12:57:46PM -0700, Junio C Hamano wrote: >>> Matthieu Moy writes: >>> ... >>> > for header in .h ewah/*.h vcs-svn/*.h xdiff/*.h >>> > do >>> > ... >>> > done >>> >>> Yes, that would be even better. Then you wouldn't

Re: [RFC PATCH v2 1/2] Makefile: add check-headers target

2014-09-10 Thread Junio C Hamano
David Aguilar writes: > On Mon, Sep 08, 2014 at 12:57:46PM -0700, Junio C Hamano wrote: >> Matthieu Moy writes: >> ... >> > for header in .h ewah/*.h vcs-svn/*.h xdiff/*.h >> > do >> >... >> > done >> >> Yes, that would be even better. Then you wouldn't even have to >> worry about $IFS dan

Re: [RFC PATCH v2 1/2] Makefile: add check-headers target

2014-09-09 Thread David Aguilar
On Mon, Sep 08, 2014 at 12:57:46PM -0700, Junio C Hamano wrote: > Matthieu Moy writes: > > > Junio C Hamano writes: > > > >> David Aguilar writes: > >> > >>> +IFS=' > >>> +' > >>> +git ls-files *.h ewah/*.h vcs-svn/*.h xdiff/*.h | > >> > >> Hmm. This is only for true developers (not one who me

Re: [RFC PATCH v2 1/2] Makefile: add check-headers target

2014-09-08 Thread Junio C Hamano
Matthieu Moy writes: > Junio C Hamano writes: > >> David Aguilar writes: >> >>> +IFS=' >>> +' >>> +git ls-files *.h ewah/*.h vcs-svn/*.h xdiff/*.h | >> >> Hmm. This is only for true developers (not one who merely compiles >> after expanding a tarball), so "git ls-files" may probably be OK. >>

Re: [RFC PATCH v2 1/2] Makefile: add check-headers target

2014-09-08 Thread Matthieu Moy
Junio C Hamano writes: > David Aguilar writes: > >> +IFS=' >> +' >> +git ls-files *.h ewah/*.h vcs-svn/*.h xdiff/*.h | > > Hmm. This is only for true developers (not one who merely compiles > after expanding a tarball), so "git ls-files" may probably be OK. > > But "/bin/ls" would be equally fi

Re: [RFC PATCH v2 1/2] Makefile: add check-headers target

2014-09-08 Thread Junio C Hamano
David Aguilar writes: > +IFS=' > +' > +git ls-files *.h ewah/*.h vcs-svn/*.h xdiff/*.h | Hmm. This is only for true developers (not one who merely compiles after expanding a tarball), so "git ls-files" may probably be OK. But "/bin/ls" would be equally fine for that, no? After all, you are le

Re: [RFC PATCH v2 1/2] Makefile: add check-headers target

2014-09-07 Thread Jonathan Nieder
Hi, David Aguilar wrote: > --- /dev/null > +++ b/check-headers.sh > @@ -0,0 +1,29 @@ [...] > + "$@" -Wno-unused -I"$subdir" -c -o "$header".check -x c - <"$header" && All .c files in git are supposed to start by #include-ing git-compat-util.h, cache.h, or builtin.h to set the appropriate fea

[RFC PATCH v2 1/2] Makefile: add check-headers target

2014-09-06 Thread David Aguilar
This allows us to ensure that each header can be included individually without needing to include other headers first. Signed-off-by: David Aguilar --- Changes since v1: We now include xdiff, ewah, and vcs-svn headers. Makefile | 6 ++ check-headers.sh | 29