Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1385857

Re: [PATCH] checkpatch.pl: add support for checking patch from git repository

From Sebastian Reichel <sre@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] checkpatch.pl: add support for checking patch from git repository
Date 2016-04-24 20:20 +0200
Message-ID <rrwNs-sE-7@gated-at.bofh.it> (permalink)
References (1 earlier) <rrqoG-3zA-5@gated-at.bofh.it> <rrtZg-6Hu-7@gated-at.bofh.it> <rruLD-7mn-9@gated-at.bofh.it> <rrwaJ-8jH-5@gated-at.bofh.it> <rrwkq-8ob-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi,

On Sun, Apr 24, 2016 at 10:43:44AM -0700, Joe Perches wrote:
> On Sun, 2016-04-24 at 19:30 +0200, Sebastian Reichel wrote:
> > On Sun, Apr 24, 2016 at 09:07:21AM -0700, Joe Perches wrote:
> > > On Sun, 2016-04-24 at 17:10 +0200, Sebastian Reichel wrote:
> > > > On Sun, Apr 24, 2016 at 04:22:45AM -0700, Joe Perches wrote:
> > > > > On Sun, 2016-04-24 at 18:40 +0800, changbin.du@intel.com wrote:
> > > > > > This patch add "-g, --git" option that tread FILE as git commits
> > > > > > expression. You can specify the git commit hash ID expressions,
> > > > > > then these commits from your git repository will be checked.
> > > > > Why would anyone want to use checkpatch on commits already in git?
> > > > It may be in some non-public development branch. Usually when I
> > > > write patches I open a file, change it and commit the result or even
> > > > interim result to have backups and other git features available as
> > > > soon as possible. All testing is done later.
> > > > 
> > > > So IMHO this is a really useful feature.
> > > I think it would be a more useful feature for
> > > something like a git pull request rather than
> > > a local git repository.
> > There are basically two places, where one wants to check patches:
> > 
> > 1. When one creates/modifies patches
> > 2. When one wants to apply patches in some tree
> 
> 3. when one wants to accept patches from a pull request.
> 
> > I'm perfectly happy with checkpatch's current behaviour for
> > the second task. OTOH during development I would find it useful
> > if I can do something like "checkpatch --git HEAD~3..HEAD".
> 
> So you can rework the patches that are already applied?
> What would you do if it showed errors/defects?
> 
> Encouraging rework seems inefficient.

No, but I can do it with patches I'm currently writing. My workflow
when working on patches I write some stuff and commit it. When I
have reached a status where the result looks ok to me, I start to
prepare it for sending it to the mailinglists.

That involves squashing some patches, changing some descriptions,
running checkpatch, maybe reorder some patches. IMHO having a --git
option is not an encouragement, but makes it less annoying to run it
in this use case.

-- Sebastian

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] checkpatch.pl: add support for checking patch from git repository changbin.du@intel.com - 2016-04-24 13:00 +0200
  Re: [PATCH] checkpatch.pl: add support for checking patch from git  repository Joe Perches <joe@perches.com> - 2016-04-24 13:30 +0200
    Re: [PATCH] checkpatch.pl: add support for checking patch from git  repository Sebastian Reichel <sre@kernel.org> - 2016-04-24 17:20 +0200
      Re: [PATCH] checkpatch.pl: add support for checking patch from git  repository Joe Perches <joe@perches.com> - 2016-04-24 18:10 +0200
        Re: [PATCH] checkpatch.pl: add support for checking patch from git  repository Sebastian Reichel <sre@kernel.org> - 2016-04-24 19:40 +0200
          Re: [PATCH] checkpatch.pl: add support for checking patch from git  repository Joe Perches <joe@perches.com> - 2016-04-24 19:50 +0200
            Re: [PATCH] checkpatch.pl: add support for checking patch from git  repository Sebastian Reichel <sre@kernel.org> - 2016-04-24 20:20 +0200

csiph-web