Re: [PATCH 0/10] MAINTAINERS - script, patterns, and misc fixes

From: Andrew Morton
Date: Tue Jan 13 2009 - 15:55:54 EST


On Tue, 13 Jan 2009 12:28:08 -0800
Joe Perches <joe@xxxxxxxxxxx> wrote:

> This patchset adds a script to find the maintainer
> of an individual file or files in a patch and
> additional patterns to MAINTAINERS.
>
> Other information from MAINTAINERS sections can
> also be generated by file or patch.

I applaud the intent.

This patchset is basically unmergeable by anyone except Linus - it
already gets three rejects against half-hour-old mainline.

We need to ensure that scripts/get_maintainer.pl gets its "x" bit set,
somehow (you lose it if you just apply the patch). Perhaps the
instructions should say

perl scripts/get_maintainer.pl ...

rather than just


scripts/get_maintainer.pl ...


How does it work, anyway?

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!



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?


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.


It's a bit slow. That's git's fault. Perhaps some git person will be
able to suggest ways of speeding it up.

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!


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:

akpm:/usr/src/25> who-maintains.sh mm/filemap.c
Nick Piggin <npiggin@xxxxxxx>
Hugh Dickins <hugh@xxxxxxxxxxx>
Fengguang Wu <wfg@xxxxxxxxxxxxxxxx>
Christoph Hellwig <hch@xxxxxx>
Steven Whitehouse <swhiteho@xxxxxxxxxx>
Zach Brown <zach.brown@xxxxxxxxxx>
Miklos Szeredi <mszeredi@xxxxxxx>
Jan Kara <jack@xxxxxxx>
Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx>
Badari Pulavarty <pbadari@xxxxxxxxxx>

For some (git related) reason it is vastly slower than yours.

#!/bin/sh
#
# Usage: who-maintains.sh file1 file2 ..
#

TMP=$(mktemp /tmp/who-maintains-XXXXXX)
TMP2=$(mktemp /tmp/who-maintains2-XXXXXX)
TMP=/tmp/1
TMP2=/tmp/2
GITDIR=/usr/src/git26

cd $GITDIR

FILES=""
for i in $*
do
if [ -e $i ]
then
FILES=$FILES" $i"
fi
done

if [ x"$FILES" == "x" ]
then
exit 0
fi

git whatchanged $FILES > $TMP

cat $TMP |
(
egrep "Author:|Signed-off-by:" |
grep -v torvalds |
grep -v akpm |
sed -e 's/^[ ]*//' |
sed -e 's/Signed-off-by:[ ]*//' |
sed -e 's/Author:[ ]*//' |
sort
) > $TMP2

LAST=""
COUNT=0

grokkit()
{
while read NAME
do
if [ "$NAME" == "$LAST" ]
then
COUNT=$(expr $COUNT + 1)
else
if [ x"$LAST" != "x" ]
then
echo $COUNT $LAST
fi
LAST="$NAME"
COUNT=1
fi
done
if [ x"$LAST" != "x" ]
then
echo $COUNT $LAST
fi
}

grokkit < $TMP2 | sort -nr | head -n 10 | sed -e 's/[0-9]* //'

#rm -f $TMP $TMP2


--
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/