2007-11-30 15:19:15

by Kumar Gala

[permalink] [raw]
Subject: git + checkpatch.pl?

Does any know if there is a way to run checkpatch.pl over the index
before one does a commit?

- k


2007-11-30 15:23:34

by Alexey Dobriyan

[permalink] [raw]
Subject: Re: git + checkpatch.pl?

On 11/30/07, Kumar Gala <[email protected]> wrote:
> Does any know if there is a way to run checkpatch.pl over the index
> before one does a commit?

Something like .git/hooks/pre-commit hook should work.

Alexey, who never used it.

2007-11-30 15:29:17

by Dave Jones

[permalink] [raw]
Subject: Re: git + checkpatch.pl?

On Fri, Nov 30, 2007 at 09:18:59AM -0600, Kumar Gala wrote:
> Does any know if there is a way to run checkpatch.pl over the index
> before one does a commit?

git diff | scripts/checkpatch.pl

?

Dave
--
http://www.codemonkey.org.uk

2007-11-30 15:42:14

by Kumar Gala

[permalink] [raw]
Subject: Re: git + checkpatch.pl?


On Nov 30, 2007, at 9:28 AM, Dave Jones wrote:

> On Fri, Nov 30, 2007 at 09:18:59AM -0600, Kumar Gala wrote:
>> Does any know if there is a way to run checkpatch.pl over the index
>> before one does a commit?
>
> git diff | scripts/checkpatch.pl

thanks. I think I want:

git-diff HEAD | scripts/checkpatch.pl --no-signoff -

but the general idea works. (need more sleep)

- k