Re: [PATCH 0/10] MAINTAINERS - script, patterns, and misc fixes
From: Joe Perches
Date: Tue Jan 13 2009 - 22:48:23 EST
On Tue, 2009-01-13 at 12:54 -0800, Andrew Morton wrote:
> I applaud the intent.
> This patchset is basically unmergeable by anyone except Linus - it
> already gets three rejects against half-hour-old mainline.
True.
> How does it work, anyway?
Find a section/file match by pattern.
If --git set (default), find the git "by: " signees by file.
It uses the equivalent of what Linus posted quite a while back.
+sub recent_git_signoffs {
+ my ($file) = @_;
+
+ my $sign_offs = "";
+ my $cmd = "";
+ my $output = "";
+
+ my @lines = ();
+
+ if (which("git") eq "") {
+ die("$P: git not found. Add --nogit to options?\n");
+ }
+
+ $cmd = "git log --since=12.months.ago -- ${file}";
+ $cmd .= " | grep -i '^ [-a-z]*by:.*\\\@'";
+ if (!$email_git_penguin_chiefs) {
+ $cmd .= " | grep -E -v \"${penguin_chiefs}\"";
+ }
+ $cmd .= " | sort | uniq -c | sort -r -n | head -n 5";
+ $cmd .= " | cut -f 2 -d ':' -s";
> akpm:/usr/src/git26> ../25/scripts/get_maintainer.pl -f mm/filemap.c
> Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx>
> Hugh Dickins <hugh@xxxxxxxxxxx>
> KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
> Miklos Szeredi <mszeredi@xxxxxxx>
> Nick Piggin <npiggin@xxxxxxx>
>
> I think Balbir would be surprised!
$ scripts/get_maintainer.pl --nogit -f mm/filemap.c
linux-kernel@xxxxxxxxxxxxxxx
linux-mm@xxxxxxxxx
> akpm:/usr/src/git26> ../25/scripts/get_maintainer.pl -f fs/ext3/super.c
> Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx>
> Christoph Hellwig <hch@xxxxxx>
> Jan Blunck <jblunck@xxxxxxx>
> Jan Kara <jack@xxxxxxx>
> Marcin Slusarz <marcin.slusarz@xxxxxxxxx>
>
> mm.. spose so, but it isn't terribly accurate. Does it take
> signed-off-by:s and/or the git Commit: header into account?
Just the most frequent and top 5 "by:" signees for the last year.
$ scripts/get_maintainer.pl --nogit -f fs/ext3/super.c
Andreas Dilger <adilger@xxxxxxx>
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Stephen Tweedie <sct@xxxxxxxxxx>
linux-ext4@xxxxxxxxxxxxxxx
> akpm:/usr/src/git26> ../25/scripts/get_maintainer.pl -f fs/xfs/xfs.h
> Christoph Hellwig <hch@xxxxxxxxxxxxx>
> Donald Douwsma <donaldd@xxxxxxx>
> Eric Sandeen <sandeen@xxxxxxxxxxx>
> Lachlan McIlroy <lachlan@xxxxxxx>
> Tim Shimmin <tes@xxxxxxx>
>
> OK, that was an easy case.
$ scripts/get_maintainer.pl --nogit -f fs/xfs/xfs.h
Tim Shimmin <xfs-masters@xxxxxxxxxxx>
xfs@xxxxxxxxxxx
> It's a bit slow. That's git's fault. Perhaps some git person will be
> able to suggest ways of speeding it up.
Don't use git? Add --nogit?
> akpm:/usr/src/git26> ../25/scripts/get_maintainer.pl -f mm/pdflush.c
> Ingo Molnar <mingo@xxxxxxx>
> Jesper Juhl <jesper.juhl@xxxxxxxxx>
> Mike Travis <travis@xxxxxxx>
> OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
> Pavel Machek <pavel@xxxxxxx>
>
> again, not the result I'd have expected!
$ scripts/get_maintainer.pl --nogit -f mm/pdflush.c
linux-kernel@xxxxxxxxxxxxxxx
linux-mm@xxxxxxxxx
> But I guess we can fine-tune these thnigs after we get the bulk of it
> settled in.
> My script generates what I consider to be better results:
[script...]
I have no problem changing the get_maintainer.pl script to use
only the "author:" instead of the signees.
My desire is to add the file patterns themselves.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/