Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754315AbcCCDcg (ORCPT ); Wed, 2 Mar 2016 22:32:36 -0500 Received: from smtprelay0030.hostedemail.com ([216.40.44.30]:60190 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751891AbcCCDcf (ORCPT ); Wed, 2 Mar 2016 22:32:35 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 50,0,0,,d41d8cd98f00b204,joe@perches.com,:::,RULES_HIT:41:355:379:541:599:800:960:967:968:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1381:1431:1437:1515:1516:1518:1535:1544:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2525:2560:2563:2682:2685:2828:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3355:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:5007:6261:7903:9010:9025:10004:10848:10967:11232:11658:11783:11854:11914:12043:12296:12517:12519:12555:12740:13161:13229:13255:13439:13548:13891:13894:14659:21060:21080:30012:30054:30062:30064: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:0:0,LFtime:4,LUA_SUMMARY:none X-HE-Tag: chair03_8a9278c4b041c X-Filterd-Recvd-Size: 5484 Message-ID: <1456975950.4044.92.camel@perches.com> Subject: Re: about get_maintainer.pl not showing the original author of the modified code From: Joe Perches To: Jianyu Zhan , LKML Date: Wed, 02 Mar 2016 19:32:30 -0800 In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4592 Lines: 81 On Thu, 2016-03-03 at 11:00 +0800, Jianyu Zhan wrote: > Hi, Joe, > > recently in this patch https://lkml.org/lkml/2016/3/2/281, > > I found the original author of the modified code was not > suggested as a patch reviewer. > > This surprised me at first.??But later I realized that it is not trivial > to define "original author", since the last modification might be > just code polishing.??To dig out the original author, we might need > go up the commit history and git must be equipped with ability of pattern > recognization to analyze code. > > What do you think? There are many options to the get_maintainer script. You can see all of them with "./scripts/get_maintainer.pl --help" Many are not enabled because run-time can be very long as running various git commands can take awhile to complete. $ ./scripts/get_maintainer.pl --git-blame > with your patch get_maintainer.pl and --git-blame gives: $ ./scripts/get_maintainer.pl ~/1.diff --git-blame Thomas Gleixner (commit_signer:20/19=100%,authored:7/19=37%,added_lines:73/248=29%,removed_lines:38/119=32%) Peter Zijlstra (commit_signer:3/19=16%,authored:1/19=5%) Andrew Morton (commit_signer:3/19=16%,modified commits:2/3=67%) Davidlohr Bueso (commit_signer:3/19=16%,authored:3/19=16%,added_lines:113/248=46%,removed_lines:20/119=17%) Ingo Molnar (commit_signer:2/19=11%,modified commits:2/3=67%) Dominik Dingel (authored:1/19=5%) Jann Horn (authored:1/19=5%) Sebastian Andrzej Siewior (added_lines:29/248=12%) "Kirill A. Shutemov" (added_lines:14/248=6%,removed_lines:49/119=41%) Darren Hart (modified commits:1/3=33%) Stephen Hemminger (modified commits:1/3=33%) Christian Borntraeger (modified commits:1/3=33%) linux-kernel@vger.kernel.org (open list) vs $ ./scripts/get_maintainer.pl ~/1.diff Thomas Gleixner (commit_signer:20/19=100%,authored:7/19=37%,added_lines:73/248=29%,removed_lines:38/119=32%) Davidlohr Bueso (commit_signer:3/19=16%,authored:3/19=16%,added_lines:113/248=46%,removed_lines:20/119=17%) Peter Zijlstra (commit_signer:3/19=16%) Andrew Morton (commit_signer:3/19=16%) Ingo Molnar (commit_signer:2/19=11%) Rasmus Villemoes (authored:1/19=5%) Darren Hart (authored:1/19=5%) kbuild test robot (authored:1/19=5%) Sebastian Andrzej Siewior (added_lines:29/248=12%) "Kirill A. Shutemov" (added_lines:14/248=6%,removed_lines:49/119=41%) running git blame alone gives: $ git blame -L1927,+8 kernel/futex.c ^1da177e (Linus Torvalds????????2005-04-16 15:20:36 -0700 1927)? ^1da177e (Linus Torvalds????????2005-04-16 15:20:36 -0700 1928)?????????/* In the common case we don't take the spinlock, which is nice. */ 42d35d48 (Darren Hart???????????2008-12-29 15:49:53 -0800 1929) retry: ^1da177e (Linus Torvalds????????2005-04-16 15:20:36 -0700 1930)?????????lock_ptr = q->lock_ptr; e91467ec (Christian Borntraeger 2006-08-05 12:13:52 -0700 1931)?????????barrier(); c80544dc (Stephen Hemminger?????2007-10-18 03:07:05 -0700 1932)?????????if (lock_ptr != NULL) { ^1da177e (Linus Torvalds????????2005-04-16 15:20:36 -0700 1933)?????????????????spin_lock(lock_ptr); ^1da177e (Linus Torvalds????????2005-04-16 15:20:36 -0700 1934)?????????????????/* with whitespace ignored, it gives: $ git blame -w -L1927,+8 kernel/futex.c? ^1da177e (Linus Torvalds????????2005-04-16 15:20:36 -0700 1927)? ^1da177e (Linus Torvalds????????2005-04-16 15:20:36 -0700 1928)?????????/* In the common case we don't take the spinlock, which is nice. */ ^1da177e (Linus Torvalds????????2005-04-16 15:20:36 -0700 1929) retry: ^1da177e (Linus Torvalds????????2005-04-16 15:20:36 -0700 1930)?????????lock_ptr = q->lock_ptr; e91467ec (Christian Borntraeger 2006-08-05 12:13:52 -0700 1931)?????????barrier(); c80544dc (Stephen Hemminger?????2007-10-18 03:07:05 -0700 1932)?????????if (lock_ptr != NULL) { ^1da177e (Linus Torvalds????????2005-04-16 15:20:36 -0700 1933)?????????????????spin_lock(lock_ptr); ^1da177e (Linus Torvalds????????2005-04-16 15:20:36 -0700 1934)?????????????????/* so there's an argument that get_maintainer.pl should by default ignore whitespace changes.