Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752898AbcDXRnt (ORCPT ); Sun, 24 Apr 2016 13:43:49 -0400 Received: from smtprelay0173.hostedemail.com ([216.40.44.173]:51451 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752635AbcDXRns (ORCPT ); Sun, 24 Apr 2016 13:43:48 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 20,1.5,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:355:379:541:599:800:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2693:2828:3138:3139:3140:3141:3142:3354:3622:3865:3867:3868:3870:3871:3872:3873:3874:4250:4321:5007:6119:10009:10400:10848:11232:11658:11914:12517:12519:12663:12740:13069:13311:13357:13439:14181:14659:14721:21080:21324:30054:30056:30064:30070:30080:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:1:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: sink93_78396cfc82741 X-Filterd-Recvd-Size: 2586 Message-ID: <1461519824.2726.78.camel@perches.com> Subject: Re: [PATCH] checkpatch.pl: add support for checking patch from git repository From: Joe Perches To: Sebastian Reichel Cc: changbin.du@intel.com, apw@canonical.com, linux-kernel@vger.kernel.org Date: Sun, 24 Apr 2016 10:43:44 -0700 In-Reply-To: <20160424173012.GA29148@earth> References: <1461494406-30000-1-git-send-email-changbin.du@intel.com> <1461496965.2726.50.camel@perches.com> <20160424151052.GA12279@earth> <1461514041.2726.59.camel@perches.com> <20160424173012.GA29148@earth> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.2-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1624 Lines: 33 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.