Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752920AbcDXRaU (ORCPT ); Sun, 24 Apr 2016 13:30:20 -0400 Received: from mail.kernel.org ([198.145.29.136]:59038 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752737AbcDXRaT (ORCPT ); Sun, 24 Apr 2016 13:30:19 -0400 Date: Sun, 24 Apr 2016 19:30:13 +0200 From: Sebastian Reichel To: Joe Perches Cc: changbin.du@intel.com, apw@canonical.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] checkpatch.pl: add support for checking patch from git repository Message-ID: <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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="FL5UXtIhxfXey3p5" Content-Disposition: inline In-Reply-To: <1461514041.2726.59.camel@perches.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2455 Lines: 61 --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, 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: > > > > From: "Du, Changbin" > > > > 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. > >=20 > > So IMHO this is a really useful feature. >=20 > 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 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". -- Sebastian --FL5UXtIhxfXey3p5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJXHQKaAAoJENju1/PIO/qa9eUQAKbBPEuF0B+sftA8ev1QQNet dlmxGkq6Z7qJGANg1n7FoXjeR5B52w7Ph66J8wQZ9A3NNDxyhmwxftJp9S8BP7Hq HswWdkAALkUBxQ41TgrKeJW9k7j2Dvd4lkgtxqlUhSDzSNupawlfSldIjrnVrvxZ MvDPxJz7w0bifiEI3cCNJu4+/CZPFLjxrcbAZhMLcbSR9WNhnsIMrNlVdgq1m9m3 HWKTN+s0cbMMxZja82mqClzSrK5vmPb6ELmKdtffAaCEV21h1YwjP/RmEcxXxOoO UWDWknJh4r1d4M67x2P45uDHWQOYfB5qb6VkUlafsXRFrEhjN01O1/SCs1fVNjPR sVL9m6WP6LGMp3oBJMU96tMMU6OqEVmt6gH/6ZaD1gb0QdzgL0A/7gR9PLbZraGF KA8zfy8f9sRXABQPyy0u5/RekRYJr+K5XH0VC9swvOtwzSW4p0pmb3rvzPSkHcN9 V6I0EmyF9/wNpefDaezU20/Mt2WkT8dZAEEbe4q5BSxc0I9rA+mtpkuiUnAU5CRe j3vlA8JJ0VMBO6oy8U6mcQ385zzMna8xDanpd1/sDFFpWE+U4iIm3Wtyhyb0eZsi q5EBlAGLfpM3OSsnuG3X865mrdqmkeSan/mex5RwgPXAUwgjFYoJqe13pqNFJVDT 9qXkSK5k2VyB7vr59bDH =SjIl -----END PGP SIGNATURE----- --FL5UXtIhxfXey3p5--