[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <878t1tgpk8.fsf@intel.com>
Date: Fri, 16 Nov 2018 14:44:07 +0200
From: Jani Nikula <jani.nikula@...el.com>
To: Julia Lawall <julia.lawall@...6.fr>,
Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: ksummit-discuss@...ts.linuxfoundation.org,
"linux-nvdimm\@lists.01.org" <linux-nvdimm@...ts.01.org>,
vishal.l.verma@...el.com,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Dmitry Vyukov <dvyukov@...gle.com>,
Greg KH <gregkh@...uxfoundation.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
stfrench@...rosoft.com, "Tobin C. Harding" <me@...in.cc>
Subject: Re: [Ksummit-discuss] [RFC PATCH 2/3] MAINTAINERS, Handbook: Subsystem Profile
On Thu, 15 Nov 2018, Julia Lawall <julia.lawall@...6.fr> wrote:
> On Thu, 15 Nov 2018, Geert Uytterhoeven wrote:
>
>> Hi Julia,
>>
>> On Thu, Nov 15, 2018 at 6:48 AM Julia Lawall <julia.lawall@...6.fr> wrote:
>> > How about patch subject lines? What is the formula that should be used to
>> > transform the name(s) of the affected file(s) into an appropriate suject
>> > line?
>>
>> Automating that may be difficult.
>> I always use "git log --oneline", and try to derive something sane
>> from its output.
>
> Yes, I do likewise. But there may be some subsystems for which it would
> be possible to come up with a more specific policy. The advantage of what
> is proposed here is that it is not necessary to come up with a single
> formula that works everywhere. Even a description in English could be
> helpful.
I quickly cooked up this script to produce the top-5 commit prefixes for
the given files over the arbitrary last 200 commits. It'll give you a
pretty good idea if you're even close.
---
#!/bin/sh
# usage: subject-prefix FILE [...]
# show top 5 subject prefixes for FILEs
git log --format=%s -n 200 -- "$@" |\
grep -v "^Merge " |\
sed 's/\(.*\):.*/\1/' |\
sort | uniq -c | sort -nr | sed 's/ *[0-9]\+ //' |\
head -n 5
---
Someone who knows perl could turn that into a checkpatch check: See if
the patch subject prefix is one of the top-5 for all files changed by
the patch, and ask the user to double check if it isn't. Or some
heuristics thereof.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
Powered by blists - more mailing lists