qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] checkpatch: add a little script to run checkpat


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH] checkpatch: add a little script to run checkpatch against a git refspec
Date: Mon, 21 Jan 2013 21:05:28 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130105 Thunderbird/17.0.2

Am 21.01.2013 20:21, schrieb Anthony Liguori:
> Peter Maydell <address@hidden> writes:
> 
>> On 21 January 2013 16:48, Anthony Liguori <address@hidden> wrote:
>>> This makes it easier to use checkpatch with a git hook or via patches.
>>
>> Any chance of a note in the comments about how to actually hook
>> it up to a git hook or patches? ie something like
>>
>> # This script is intended to be used to allow checkpatch to
>> # be automatically run from a git hook or via the 'patches'
>> # tool [see http://link to download patches/], like this:
>> #
>> # [insert brief summary of how to hook it up here]
> 
> That was sort of a theoritical statement.  Normally you would use a
> pre-hook to do this and just use a git diff.  I assume you can use a
> post-receive hook with this script but I'm not sure that's relevant to
> anyone other than me.

I'm been trying to use a pre-applypatch hook with checkpatch.pl but this
completely broke rebasing branches with false positives in them (which I
get quite a lot, especially related to pointer * spacing).

Right now I run a trivial script manually:

#!/bin/sh
git diff HEAD^ | ./scripts/checkpatch.pl --no-signoff -

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]