* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
[not found] ` <46C1CFFE.4000001@gmail.com>
@ 2007-08-14 17:00 ` Joe Perches
2007-08-14 18:03 ` Rene Herman
2007-08-15 1:31 ` Junio C Hamano
0 siblings, 2 replies; 38+ messages in thread
From: Joe Perches @ 2007-08-14 17:00 UTC (permalink / raw)
To: Rene Herman, git, Junio C Hamano
Cc: Alan Cox, Arjan van de Ven, Trond Myklebust, Mariusz Kozlowski,
akpm, linux-kernel, torvalds
On Tue, 2007-08-14 at 17:53 +0200, Rene Herman wrote:
> It isn't about MODULE_FOO() tags, it is about tagging /source/ files
> to help with putting CCs on patch submissals.
> If we want to link source file foo.c and the
> MAINTAINERS information, we have 3 options:
> 1. MAINTAINERS --> foo.c
> 2. foo.c --> MAINTAINERS
> 3. foo.c <--> some 3rd file <--> MAINTAINERS
I added git@vger.kernel.org and Junio Hamano
Another possibility is improving git to allow
some sort of "declaration of interest" in bits
of projects.
That would allow options like:
o git-format-patch to include CCs
o git-commit and git-branch to notify or
take some other action
etc...
It's generic, applies to multiple projects, etc.
I don't care which mechanism is used, I just want
to be able to CC appropriate people and lists on
changes to their areas of interest without wasting
time searching all over the place per file changed.
The LK MAINTAINERS file is weakly specified, but
I'm not a git-geek, nor do I want to be one, so
MAINTAINERS was the file I could easiest change
with minimal impact to LK sources.
The get_maintainer script is trivial,
I'm not wedded to it at all.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-14 17:00 ` [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl Joe Perches
@ 2007-08-14 18:03 ` Rene Herman
2007-08-14 18:28 ` Joe Perches
2007-08-15 1:31 ` Junio C Hamano
1 sibling, 1 reply; 38+ messages in thread
From: Rene Herman @ 2007-08-14 18:03 UTC (permalink / raw)
To: Joe Perches
Cc: git, Junio C Hamano, Alan Cox, Arjan van de Ven, Trond Myklebust,
Mariusz Kozlowski, akpm, linux-kernel, torvalds
On 08/14/2007 07:00 PM, Joe Perches wrote:
> On Tue, 2007-08-14 at 17:53 +0200, Rene Herman wrote:
>> It isn't about MODULE_FOO() tags, it is about tagging /source/ files
>> to help with putting CCs on patch submissals.
>> If we want to link source file foo.c and the
>> MAINTAINERS information, we have 3 options:
>> 1. MAINTAINERS --> foo.c
>> 2. foo.c --> MAINTAINERS
>> 3. foo.c <--> some 3rd file <--> MAINTAINERS
>
> I added git@vger.kernel.org and Junio Hamano
Well, yes, I agree -- going through GIT seems to be the only really workable
solution.
That is, instead of (case 2, you snipped it) having a backlink to the
MAINTAINERS file in a header inside the source GIT would maintain this
backlink -- and at that point, you can basically forego the MAINTAINERS file
completely other than as something GIT can generate and just regard all of
it meta-information (you may want to generate MAINTAINERS for releases but
making GIT the source is the idea).
"git info --maintainer drivers/ide/ide-cd.c" or some such would say "Alan
Cox <alan@...>".
There are more possibilities for this kind of meta information. git info
--author, git info --license, git info --whatever. Given that it's intended
for developers, needing GIT should not get in the way but there's always the
generated MAINTAINERS file in releases as well.
It would ofcourse automatically stay up to date through deleting and moving
of files. You'd probably want to devise a way to enable a submitter to also
automatically provide meta-information upon addition of files. This can be
done in the same way as a "Signed-off-by". Just tags in a submit email.
This should probably turn out to be the way things work yes. The paths in
the MAINTAINERS file grow stale, source headers might also and sticking
headers on every source file isn't nice anyway -- it's meta-information and
the SCM can maintain it.
Rene.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-14 18:03 ` Rene Herman
@ 2007-08-14 18:28 ` Joe Perches
2007-08-14 18:33 ` Rene Herman
2007-08-14 18:40 ` Linus Torvalds
0 siblings, 2 replies; 38+ messages in thread
From: Joe Perches @ 2007-08-14 18:28 UTC (permalink / raw)
To: Rene Herman
Cc: git, Junio C Hamano, Alan Cox, Arjan van de Ven, Trond Myklebust,
Mariusz Kozlowski, akpm, linux-kernel, torvalds
On Tue, 2007-08-14 at 20:03 +0200, Rene Herman wrote:
> "git info --maintainer drivers/ide/ide-cd.c" or some such would say "Alan
> Cox <alan@...>".
Perhaps maintainer(s), approver(s), listener(s)?
I think something like this should be a git-goal.
What do the git-wranglers think?
Until a time in the future when a system like that exists,
I suggest keeping MAINTAINERS up-to-date with
F: pattern
It'll be useful as git-set-maintainer seeds at least.
> sticking headers on every source file isn't nice anyway --
> it's meta-information and the SCM can maintain it.
It's like looking at $CVS$ keywords. Unsightly.
cheers, Joe
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-14 18:28 ` Joe Perches
@ 2007-08-14 18:33 ` Rene Herman
2007-08-14 18:40 ` Linus Torvalds
1 sibling, 0 replies; 38+ messages in thread
From: Rene Herman @ 2007-08-14 18:33 UTC (permalink / raw)
To: Joe Perches
Cc: git, Junio C Hamano, Alan Cox, Arjan van de Ven, Trond Myklebust,
Mariusz Kozlowski, akpm, linux-kernel, torvalds
On 08/14/2007 08:28 PM, Joe Perches wrote:
> On Tue, 2007-08-14 at 20:03 +0200, Rene Herman wrote:
>> "git info --maintainer drivers/ide/ide-cd.c" or some such would say "Alan
>> Cox <alan@...>".
>
> Perhaps maintainer(s), approver(s), listener(s)?
>
> I think something like this should be a git-goal.
> What do the git-wranglers think?
I agree. If this thing has source management, let's use it.
> Until a time in the future when a system like that exists,
> I suggest keeping MAINTAINERS up-to-date with
>
> F: pattern
>
> It'll be useful as git-set-maintainer seeds at least.
Yes. Seeing as how it's already been useful in updating the information it
would be a shame to throw what you already did away. Don't underestimate how
fast git-wranglers can implement stuff if they agree though... :-)
>> sticking headers on every source file isn't nice anyway --
>> it's meta-information and the SCM can maintain it.
>
> It's like looking at $CVS$ keywords. Unsightly.
Again agree.
Rene.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-14 18:28 ` Joe Perches
2007-08-14 18:33 ` Rene Herman
@ 2007-08-14 18:40 ` Linus Torvalds
2007-08-14 18:54 ` Joe Perches
` (4 more replies)
1 sibling, 5 replies; 38+ messages in thread
From: Linus Torvalds @ 2007-08-14 18:40 UTC (permalink / raw)
To: Joe Perches
Cc: Rene Herman, git, Junio C Hamano, Alan Cox, Arjan van de Ven,
Trond Myklebust, Mariusz Kozlowski, akpm, linux-kernel
On Tue, 14 Aug 2007, Joe Perches wrote:
> On Tue, 2007-08-14 at 20:03 +0200, Rene Herman wrote:
> > "git info --maintainer drivers/ide/ide-cd.c" or some such would say "Alan
> > Cox <alan@...>".
>
> Perhaps maintainer(s), approver(s), listener(s)?
>
> I think something like this should be a git-goal.
> What do the git-wranglers think?
The thing is, if you have git, you can basically already do this.
Do a script like this:
#!/bin/sh
git log --since=6.months.ago -- "$@" |
grep -i '^ [-a-z]*by:.*@' |
sort | uniq -c |
sort -r -n | head
and it gives you a rather good picture of who is involved with a
particular subdirectory or file.
A much *better* picture than some manually maintained thing, in fact,
because it tells you who really does the work, and which way patches go...
(Maybe you want to add a
grep -v '\(Linus Torvalds\)\|\(Andrew Morton\)'
to avoid seeing the normal chain too much, but hey, we probably want to
know too. Anyway - the script can certainly be tweaked, the point is
really just that the git tree _already_ contains the relevant
information).
Linus
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-14 18:40 ` Linus Torvalds
@ 2007-08-14 18:54 ` Joe Perches
2007-08-14 19:33 ` Al Viro
` (3 subsequent siblings)
4 siblings, 0 replies; 38+ messages in thread
From: Joe Perches @ 2007-08-14 18:54 UTC (permalink / raw)
To: Linus Torvalds
Cc: Rene Herman, git, Junio C Hamano, Alan Cox, Arjan van de Ven,
Trond Myklebust, Mariusz Kozlowski, akpm, linux-kernel
On Tue, 2007-08-14 at 11:40 -0700, Linus Torvalds wrote:
> Anyway - the script can certainly be tweaked, the point is
> really just that the git tree _already_ contains the relevant
> information).
I believe it's not specific enough.
Things like email lists would never show up.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-14 18:40 ` Linus Torvalds
2007-08-14 18:54 ` Joe Perches
@ 2007-08-14 19:33 ` Al Viro
2007-08-14 19:57 ` Joe Perches
` (2 more replies)
2007-08-15 1:35 ` Richard Knutsson
` (2 subsequent siblings)
4 siblings, 3 replies; 38+ messages in thread
From: Al Viro @ 2007-08-14 19:33 UTC (permalink / raw)
To: Linus Torvalds
Cc: Joe Perches, Rene Herman, git, Junio C Hamano, Alan Cox,
Arjan van de Ven, Trond Myklebust, Mariusz Kozlowski, akpm,
linux-kernel
On Tue, Aug 14, 2007 at 11:40:09AM -0700, Linus Torvalds wrote:
> A much *better* picture than some manually maintained thing, in fact,
> because it tells you who really does the work, and which way patches go...
>
> (Maybe you want to add a
>
> grep -v '\(Linus Torvalds\)\|\(Andrew Morton\)'
>
> to avoid seeing the normal chain too much, but hey, we probably want to
> know too. Anyway - the script can certainly be tweaked, the point is
> really just that the git tree _already_ contains the relevant
> information).
FWIW, I suspect that we are looking at that from the wrong POV. If
that's about "who ought to be Cc'd on the issues dealing with <list
of pathnames>", why does it have to be tied to "who is maintainer for
<pathname>"?
I'm not suggesting something like fs.ext2@kernel.org with something
like majordomo allowing to add yourself to those, but something less
extreme in that direction might be worth thinking about... Hell,
even simple
$ finger fs/minix/dir.c@cc.kernel.org
with majordomo-like interface for adding yourself to such lists
might solve most of those problems...
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-14 19:33 ` Al Viro
@ 2007-08-14 19:57 ` Joe Perches
2007-08-15 1:19 ` Rene Herman
2007-08-15 19:37 ` Krzysztof Halasa
2 siblings, 0 replies; 38+ messages in thread
From: Joe Perches @ 2007-08-14 19:57 UTC (permalink / raw)
To: Al Viro
Cc: Linus Torvalds, Rene Herman, git, Junio C Hamano, Alan Cox,
Arjan van de Ven, Trond Myklebust, Mariusz Kozlowski, akpm,
linux-kernel
On Tue, 2007-08-14 at 20:33 +0100, Al Viro wrote:
> FWIW, I suspect that we are looking at that from the wrong POV. If
> that's about "who ought to be Cc'd on the issues dealing with <list
> of pathnames>", why does it have to be tied to "who is maintainer for
> <pathname>"?
Right, it doesn't have to.
I think a notification list would be just fine.
> I'm not suggesting something like fs.ext2@kernel.org with something
> like majordomo allowing to add yourself to those, but something less
> extreme in that direction might be worth thinking about...
> Hell, even simple
> $ finger fs/minix/dir.c@cc.kernel.org
> with majordomo-like interface for adding yourself to such lists
> might solve most of those problems...
Might solve all of my wants for this problem.
cheers, Joe
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-14 19:33 ` Al Viro
2007-08-14 19:57 ` Joe Perches
@ 2007-08-15 1:19 ` Rene Herman
2007-08-15 13:33 ` Satyam Sharma
2007-08-15 19:37 ` Krzysztof Halasa
2 siblings, 1 reply; 38+ messages in thread
From: Rene Herman @ 2007-08-15 1:19 UTC (permalink / raw)
To: Al Viro
Cc: Linus Torvalds, Joe Perches, git, Junio C Hamano, Alan Cox,
Arjan van de Ven, Trond Myklebust, Mariusz Kozlowski, akpm,
linux-kernel
On 08/14/2007 09:33 PM, Al Viro wrote:
> FWIW, I suspect that we are looking at that from the wrong POV. If
> that's about "who ought to be Cc'd on the issues dealing with <list
> of pathnames>", why does it have to be tied to "who is maintainer for
> <pathname>"?
>
> I'm not suggesting something like fs.ext2@kernel.org with something
> like majordomo allowing to add yourself to those, but something less
> extreme in that direction might be worth thinking about... Hell,
> even simple
> $ finger fs/minix/dir.c@cc.kernel.org
> with majordomo-like interface for adding yourself to such lists
> might solve most of those problems...
It mostly is just about that it seems. However, this would not also allow
the other information currently in the MAINTAINERS file to be queried in
similar ways.
Git could grow a generic file meta data implementation through the use of
tags, sort of like tags on multimedia files although while with multimedia
files the tags are in fact stored as a file header, here you'd keep them
just in git. Any project using git would be free to define its own set of
info tags and you'd supply them to git simply as a list of
<tag>=<value>
pairs:
$ git info --add drivers/ide/ide-cd.c <<EOF
CC="Alan Cox <alan@lxorguk.ukuu.org.uk>", linux-ide@vger.kernel.org
EOF
Or as a more expansive example, with the tags set on a directory (and the
output shown this time):
$ git info drivers/infiniband/
CC="Roland Dreier <rolandd@cisco.com>"
CC="Sean Hefty <mshefty@ichips.intel.com>"
CC="Hal Rosenstock <halr@voltaire.com>"
CC=openib-general@openib.org
W=http://www.openib.org/
T=git kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git
$ git info --type="W" drivers/infiniband/
http://www.openib.org/
The project can link the actual tags such as CC, W and T to --options for
the "info" command in the git configuration file for the tree (and/or just
define a few upfront I guess) making it look nicer:
$ git info --cc drivers/infiniband/
"Roland Dreier <rolandd@cisco.com>"
"Sean Hefty <mshefty@ichips.intel.com>"
"Hal Rosenstock <halr@voltaire.com>"
openib-general@openib.org
$ git info --website drivers/infiniband/
http://www.openib.org/
$ git info --tree drivers/infiniband/
git kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git
Extra: when you have such an implementation, you can use it for other
purposes as well such as the summary Documentation/ files want for the
00-INDEX files:
$ git info --summary Documentation/BUG-HUNTING
brute force method of doing binary search of patches to find bug.
And importantly -- when queuried for a file that itself doesn't have the
requested info tag:
$ git info --cc drivers/infiniband/core/addr.c
git looks for the tag on the drivers/infiniband/core/ directory next, and
then on drivers/infiniband/, where it finds it. linux-kernel@vger.kernel.org
would be the final fallback, being set on the project root.
I'd really like something like this. As long as projects are both free to
use and not use them and free to define their own set of tags I believe this
would work very nicely.
Once you have these tags, you can basically use them for anything.
Rene.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-14 17:00 ` [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl Joe Perches
2007-08-14 18:03 ` Rene Herman
@ 2007-08-15 1:31 ` Junio C Hamano
2007-08-15 2:12 ` Joe Perches
2007-08-17 2:13 ` Joe Perches
1 sibling, 2 replies; 38+ messages in thread
From: Junio C Hamano @ 2007-08-15 1:31 UTC (permalink / raw)
To: Joe Perches
Cc: Rene Herman, git, Alan Cox, Arjan van de Ven, Trond Myklebust,
Mariusz Kozlowski, akpm, linux-kernel, torvalds
Joe Perches <joe@perches.com> writes:
> On Tue, 2007-08-14 at 17:53 +0200, Rene Herman wrote:
>> It isn't about MODULE_FOO() tags, it is about tagging /source/ files
>> to help with putting CCs on patch submissals.
>> If we want to link source file foo.c and the
>> MAINTAINERS information, we have 3 options:
>> 1. MAINTAINERS --> foo.c
>> 2. foo.c --> MAINTAINERS
>> 3. foo.c <--> some 3rd file <--> MAINTAINERS
>
> I added git@vger.kernel.org and Junio Hamano
>
> Another possibility is improving git to allow
> some sort of "declaration of interest" in bits
> of projects.
>
> That would allow options like:
>
> o git-format-patch to include CCs
> o git-commit and git-branch to notify or
> take some other action
>
> etc...
There are things git can help, and other things git does not
have any business with.
1. Finding out who the potentially interested parties are.
Linus already gave a script to grep *-by: lines from commit
messages. I find this is probably be the best option, as it
follows "yesterday's weather". People who had dealt with the
area are the ones who are likely to be interested.
git records who did the work (author) and who did the
integration to git-based patch flow (committer). It does not
structurally track intermediate people who touched the patch
on e-mail, but Signed-off-by: and Acked-by: (and sometimes I
see Cc: as well in the commit messages) are accepted social
convention in the kernel community, and taking advantage of
that is a good idea.
2. Making it easier to send your patches to these people.
There are three possible places to add Signed-off-by: and
friends in the commit messages you would mail out:
- When you create your own commit, or commit a patch that
came to you via e-mail. The commit object in your tree
will carry them --- you can send format-patch output as-is
to Linus or Andrew and you are done.
- When you run format-patch; your commit will not have extra
Cc: or "interested parties" information, you will use the
result of 1. and insert it near your own Signed-off-by: to
the format-patch output.
- When you send format-patch output, via git-send-email
perhaps.
To make the result useful for "yesterday's weather" approach,
I think it would be the best to do the first. After all,
your commit may propagate via "git pull" not over e-mail, and
no postprocessing approach would work in such a case.
The second one is my least favorite. format-patch output is
designed to record author/committer (i.e. origin) and not to
record recipient at all. "Who's interested in this" does not
simply belong there.
On the other hand, git-send-email _is_ all about sending it
out, and it needs to know who your patch should reach. I
think it makes sense to have one script that, given a set of
paths that are affected, gives a list of potentially
interested people (that is "Finding" part -- and I see there
are 600+ patches to implement this on the list), and a new
option to git-send-email to (1) inspect the patch to see what
paths are affected, and (2) call that "Find" script to figure
out whom to send it to, and probably asking for confirmation.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-14 18:40 ` Linus Torvalds
2007-08-14 18:54 ` Joe Perches
2007-08-14 19:33 ` Al Viro
@ 2007-08-15 1:35 ` Richard Knutsson
2007-08-15 9:29 ` Stefan Richter
2007-08-16 20:36 ` Joe Perches
4 siblings, 0 replies; 38+ messages in thread
From: Richard Knutsson @ 2007-08-15 1:35 UTC (permalink / raw)
To: Linus Torvalds
Cc: Joe Perches, Rene Herman, git, Junio C Hamano, Alan Cox,
Arjan van de Ven, Trond Myklebust, Mariusz Kozlowski, akpm,
linux-kernel
Linus Torvalds wrote:
> On Tue, 14 Aug 2007, Joe Perches wrote:
>
>
>> On Tue, 2007-08-14 at 20:03 +0200, Rene Herman wrote:
>>
>>> "git info --maintainer drivers/ide/ide-cd.c" or some such would say "Alan
>>> Cox <alan@...>".
>>>
>> Perhaps maintainer(s), approver(s), listener(s)?
>>
>> I think something like this should be a git-goal.
>> What do the git-wranglers think?
>>
>
> The thing is, if you have git, you can basically already do this.
>
> Do a script like this:
>
> #!/bin/sh
> git log --since=6.months.ago -- "$@" |
> grep -i '^ [-a-z]*by:.*@' |
>
sed -r "s/^.*by: \"?([^\"]+)\"?/\1/" |
> sort | uniq -c |
> sort -r -n | head
>
> and it gives you a rather good picture of who is involved with a
> particular subdirectory or file.
>
>
Like the script! Especially since it reveled --since=6.month.ago and
uniq to me.
Just wondering, why order them in the acked, signed and tested? Other
then removing those, the added 'sed' also fix the <name> vs
"<name>"-"problem". + adding '-i' to uniq should help the result too, right?
Now a simple "diffstat -p1 -l <patch> | xargs <preferred script-name>"
makes the day. Too bad, as Joe pointed out, it does not include relevant ML.
cheers
Richard Knutsson
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-15 1:31 ` Junio C Hamano
@ 2007-08-15 2:12 ` Joe Perches
2007-08-15 5:25 ` Junio C Hamano
2007-08-15 9:39 ` Stefan Richter
2007-08-17 2:13 ` Joe Perches
1 sibling, 2 replies; 38+ messages in thread
From: Joe Perches @ 2007-08-15 2:12 UTC (permalink / raw)
To: Junio C Hamano
Cc: Rene Herman, git, Alan Cox, Arjan van de Ven, Trond Myklebust,
Mariusz Kozlowski, akpm, linux-kernel, torvalds
On Tue, 2007-08-14 at 18:31 -0700, Junio C Hamano wrote:
> On the other hand, git-send-email _is_ all about sending it
> out, and it needs to know who your patch should reach. I
> think it makes sense to have one script that, given a set of
> paths that are affected, gives a list of potentially
> interested people (that is "Finding" part -- and I see there
> are 600+ patches to implement this on the list), and a new
> option to git-send-email to (1) inspect the patch to see what
> paths are affected, and (2) call that "Find" script to figure
> out whom to send it to, and probably asking for confirmation.
Yes please.
The LK MAINTAINERS file is ugly.
Might there be a git portable way to "find"?
Rene Herman had an idea about using some git
metadata that might be useful. The completely
external data approach suggested by Al Viro
might be OK too in that it wouldn't tie listeners
to git requiring more content in git metadata.
Perhaps both via something like:
--external-find "cmd @filelist"
Thanks, Joe
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-15 2:12 ` Joe Perches
@ 2007-08-15 5:25 ` Junio C Hamano
2007-08-15 5:42 ` Rene Herman
2007-08-15 9:39 ` Stefan Richter
1 sibling, 1 reply; 38+ messages in thread
From: Junio C Hamano @ 2007-08-15 5:25 UTC (permalink / raw)
To: Joe Perches
Cc: Rene Herman, git, Alan Cox, Arjan van de Ven, Trond Myklebust,
Mariusz Kozlowski, akpm, linux-kernel, torvalds
Joe Perches <joe@perches.com> writes:
> Yes please.
Huh?
> Rene Herman had an idea about using some git
> metadata that might be useful. The completely
> external data approach suggested by Al Viro
> might be OK too in that it wouldn't tie listeners
> to git requiring more content in git metadata.
The reason I found Linus's suggestion desirable is because it
fundamentally does not require git to track any metadata. If
the commits are in git, then his script would let you gather the
data, but otherwise you should be able to do the same by
grepping patches. Obviously you would need to filter by paths,
looking at the diffstat, but the approach does _not_ tie users
to git.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-15 5:25 ` Junio C Hamano
@ 2007-08-15 5:42 ` Rene Herman
0 siblings, 0 replies; 38+ messages in thread
From: Rene Herman @ 2007-08-15 5:42 UTC (permalink / raw)
To: Junio C Hamano
Cc: Joe Perches, git, Alan Cox, Arjan van de Ven, Trond Myklebust,
Mariusz Kozlowski, akpm, linux-kernel, torvalds
On 08/15/2007 07:25 AM, Junio C Hamano wrote:
> Joe Perches <joe@perches.com> writes:
>> Rene Herman had an idea about using some git
>> metadata that might be useful. The completely
>> external data approach suggested by Al Viro
>> might be OK too in that it wouldn't tie listeners
>> to git requiring more content in git metadata.
>
> The reason I found Linus's suggestion desirable is because it
> fundamentally does not require git to track any metadata. If
> the commits are in git, then his script would let you gather the
> data, but otherwise you should be able to do the same by
> grepping patches. Obviously you would need to filter by paths,
> looking at the diffstat, but the approach does _not_ tie users
> to git.
I believe that wouldn't be much of a problem really. Users in this context
are people submitting patches and most people who do will, could and maybe
even should be running git these days -- git is very good, GPLd and the
Linux source code managament system.
But for occasional contributors that don't, a MAINTAINERS file much like the
current could also be generated into releases; it's just that the source
would live as file/directory metadata inside git.
Still like the notion of a generic file/directory metadata implementation
inside git, through that "<tag>=<value>" system that I suggested. Wouldn't
be intrinsically tied to Linux or anything, with any project being free to
invent their own tags and has heaps of possible uses, from the current
MAINTAINERS info, through summary information, author/licese information,
anything goes...
Rene.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-14 18:40 ` Linus Torvalds
` (2 preceding siblings ...)
2007-08-15 1:35 ` Richard Knutsson
@ 2007-08-15 9:29 ` Stefan Richter
2007-08-15 15:31 ` Ray Lee
2007-08-16 20:36 ` Joe Perches
4 siblings, 1 reply; 38+ messages in thread
From: Stefan Richter @ 2007-08-15 9:29 UTC (permalink / raw)
To: Linus Torvalds
Cc: Joe Perches, Rene Herman, git, Junio C Hamano, Alan Cox,
Arjan van de Ven, Trond Myklebust, Mariusz Kozlowski, akpm,
linux-kernel
Linus Torvalds wrote:
> #!/bin/sh
> git log --since=6.months.ago -- "$@" |
> grep -i '^ [-a-z]*by:.*@' |
> sort | uniq -c |
> sort -r -n | head
>
> and it gives you a rather good picture of who is involved with a
> particular subdirectory or file.
No, it doesn't. The subscribers of <subsystem-devel@somewhere.org> are
not listed in patch logs.
--
Stefan Richter
-=====-=-=== =--- -====
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-15 2:12 ` Joe Perches
2007-08-15 5:25 ` Junio C Hamano
@ 2007-08-15 9:39 ` Stefan Richter
2007-08-15 11:44 ` Rene Herman
1 sibling, 1 reply; 38+ messages in thread
From: Stefan Richter @ 2007-08-15 9:39 UTC (permalink / raw)
To: Joe Perches
Cc: Junio C Hamano, Rene Herman, git, Alan Cox, Arjan van de Ven,
Trond Myklebust, Mariusz Kozlowski, akpm, linux-kernel, torvalds
Joe Perches wrote:
> On Tue, 2007-08-14 at 18:31 -0700, Junio C Hamano wrote:
>> On the other hand, git-send-email _is_ all about sending it
>> out, and it needs to know who your patch should reach. I
>> think it makes sense to have one script that,
[...]
> Yes please.
>
> The LK MAINTAINERS file is ugly.
>
> Might there be a git portable way to "find"?
Note, maintainer contacts
- should be available to patch submitters and
- must be available to *problem reporters*
without having to have git and a .git repo.
--
Stefan Richter
-=====-=-=== =--- -====
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-15 9:39 ` Stefan Richter
@ 2007-08-15 11:44 ` Rene Herman
2007-08-15 17:26 ` Joe Perches
0 siblings, 1 reply; 38+ messages in thread
From: Rene Herman @ 2007-08-15 11:44 UTC (permalink / raw)
To: Stefan Richter
Cc: Joe Perches, Junio C Hamano, git, Alan Cox, Arjan van de Ven,
Trond Myklebust, Mariusz Kozlowski, akpm, linux-kernel, torvalds
On 08/15/2007 11:39 AM, Stefan Richter wrote:
> Note, maintainer contacts
> - should be available to patch submitters and
> - must be available to *problem reporters*
> without having to have git and a .git repo.
That "must" seems rather strong. But those few non-developer users that
could care are served by a MAINTAINERS file generated into releases.
Rene.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-15 1:19 ` Rene Herman
@ 2007-08-15 13:33 ` Satyam Sharma
2007-08-15 13:39 ` Rene Herman
0 siblings, 1 reply; 38+ messages in thread
From: Satyam Sharma @ 2007-08-15 13:33 UTC (permalink / raw)
To: Rene Herman
Cc: Al Viro, Linus Torvalds, Joe Perches, git, Junio C Hamano,
Alan Cox, Arjan van de Ven, Trond Myklebust, Mariusz Kozlowski,
Andrew Morton, Linux Kernel Mailing List
Hi Rene,
On Wed, 15 Aug 2007, Rene Herman wrote:
> It mostly is just about that it seems. However, this would not also allow the
> other information currently in the MAINTAINERS file to be queried in similar
> ways.
>
> Git could grow a generic file meta data implementation through the use of
> tags, sort of like tags on multimedia files although while with multimedia
> files the tags are in fact stored as a file header, here you'd keep them just
> in git. Any project using git would be free to define its own set of info tags
> and you'd supply them to git simply as a list of
>
> <tag>=<value>
>
> pairs:
>
> $ git info --add drivers/ide/ide-cd.c <<EOF
> CC="Alan Cox <alan@lxorguk.ukuu.org.uk>", linux-ide@vger.kernel.org
> EOF
>
> Or as a more expansive example, with the tags set on a directory (and the
> output shown this time):
>
> $ git info drivers/infiniband/
> CC="Roland Dreier <rolandd@cisco.com>"
> CC="Sean Hefty <mshefty@ichips.intel.com>"
> CC="Hal Rosenstock <halr@voltaire.com>"
> CC=openib-general@openib.org
Considering some people may want to differentiate between "those who want
to be Cc'ed for patches on subsystem X" and "those who are maintainer(s)
of subsystem X", I think another "P=" kind of tag might also be useful
here.
> W=http://www.openib.org/
> T=git kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git
>
> $ git info --type="W" drivers/infiniband/
> http://www.openib.org/
>
> The project can link the actual tags such as CC, W and T to --options for the
> "info" command in the git configuration file for the tree (and/or just define
> a few upfront I guess) making it look nicer:
>
> $ git info --cc drivers/infiniband/
> "Roland Dreier <rolandd@cisco.com>"
> "Sean Hefty <mshefty@ichips.intel.com>"
> "Hal Rosenstock <halr@voltaire.com>"
> openib-general@openib.org
>
> $ git info --website drivers/infiniband/
> http://www.openib.org/
>
> $ git info --tree drivers/infiniband/
> git kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git
>
> Extra: when you have such an implementation, you can use it for other purposes
> as well such as the summary Documentation/ files want for the 00-INDEX files:
>
> $ git info --summary Documentation/BUG-HUNTING
> brute force method of doing binary search of patches to find bug.
>
> And importantly -- when queuried for a file that itself doesn't have the
> requested info tag:
>
> $ git info --cc drivers/infiniband/core/addr.c
>
> git looks for the tag on the drivers/infiniband/core/ directory next, and then
> on drivers/infiniband/, where it finds it. linux-kernel@vger.kernel.org would
> be the final fallback, being set on the project root.
>
> I'd really like something like this. As long as projects are both free to use
> and not use them and free to define their own set of tags I believe this would
> work very nicely.
>
> Once you have these tags, you can basically use them for anything.
I'd really _love_ a tool that does all that what you've proposed above!
But why does it have to be "git-info" or anything in the git(7) suite for
that matter? This sounds like a job for a different specialised tool,
along with ".metatags" kind of files dispersed in the source tree.
Satyam
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-15 13:33 ` Satyam Sharma
@ 2007-08-15 13:39 ` Rene Herman
2007-08-15 13:52 ` Kyle Moffett
0 siblings, 1 reply; 38+ messages in thread
From: Rene Herman @ 2007-08-15 13:39 UTC (permalink / raw)
To: Satyam Sharma
Cc: Al Viro, Linus Torvalds, Joe Perches, git, Junio C Hamano,
Alan Cox, Arjan van de Ven, Trond Myklebust, Mariusz Kozlowski,
Andrew Morton, Linux Kernel Mailing List
On 08/15/2007 03:33 PM, Satyam Sharma wrote:
[ git info --maintainer ]
> I'd really _love_ a tool that does all that what you've proposed above!
>
> But why does it have to be "git-info" or anything in the git(7) suite for
> that matter? This sounds like a job for a different specialised tool,
> along with ".metatags" kind of files dispersed in the source tree.
To automatically move (and delete) the meta-data alongside the files
themselves is a reason.
More generally -- shouldn't it? This is about source management (well, maybe
more about project management, but...) and the source code management tool
looks to be the right place for that. The different parts of git are
somewhat/fairly stand-alone as is, no?
Rene.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-15 13:39 ` Rene Herman
@ 2007-08-15 13:52 ` Kyle Moffett
2007-08-16 10:58 ` Rene Herman
0 siblings, 1 reply; 38+ messages in thread
From: Kyle Moffett @ 2007-08-15 13:52 UTC (permalink / raw)
To: Rene Herman
Cc: Satyam Sharma, Al Viro, Linus Torvalds, Joe Perches, git,
Junio C Hamano, Alan Cox, Arjan van de Ven, Trond Myklebust,
Mariusz Kozlowski, Andrew Morton, Linux Kernel Mailing List
On Aug 15, 2007, at 09:39:44, Rene Herman wrote:
> On 08/15/2007 03:33 PM, Satyam Sharma wrote:
>
> [ git info --maintainer ]
>
>> I'd really _love_ a tool that does all that what you've proposed
>> above! But why does it have to be "git-info" or anything in the
>> git(7) suite for that matter? This sounds like a job for a
>> different specialised tool, long with ".metatags" kind of files
>> dispersed in the source tree.
>
> To automatically move (and delete) the meta-data alongside the
> files themselves is a reason.
>
> More generally -- shouldn't it? This is about source management
> (well, maybe more about project management, but...) and the source
> code management tool looks to be the right place for that. The
> different parts of git are somewhat/fairly stand-alone as is, no?
If you were going to do that I'd just suggest making git aware of the
"user.*" extended attributes and having it save those into the git
repo along with the permission data.
Cheers,
Kyle Moffett
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-15 9:29 ` Stefan Richter
@ 2007-08-15 15:31 ` Ray Lee
0 siblings, 0 replies; 38+ messages in thread
From: Ray Lee @ 2007-08-15 15:31 UTC (permalink / raw)
To: Stefan Richter
Cc: Linus Torvalds, Joe Perches, Rene Herman, git, Junio C Hamano,
Alan Cox, Arjan van de Ven, Trond Myklebust, Mariusz Kozlowski,
akpm, linux-kernel
On 8/15/07, Stefan Richter <stefanr@s5r6.in-berlin.de> wrote:
> Linus Torvalds wrote:
> > #!/bin/sh
> > git log --since=6.months.ago -- "$@" |
> > grep -i '^ [-a-z]*by:.*@' |
> > sort | uniq -c |
> > sort -r -n | head
> >
> > and it gives you a rather good picture of who is involved with a
> > particular subdirectory or file.
>
> No, it doesn't. The subscribers of <subsystem-devel@somewhere.org> are
> not listed in patch logs.
Then maybe they should be added into the patch logs. A CC: line isn't
that big of a deal, and also shows who got notified.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-15 11:44 ` Rene Herman
@ 2007-08-15 17:26 ` Joe Perches
0 siblings, 0 replies; 38+ messages in thread
From: Joe Perches @ 2007-08-15 17:26 UTC (permalink / raw)
To: Rene Herman, Stefan Richter
Cc: Junio C Hamano, git, Alan Cox, Arjan van de Ven, Trond Myklebust,
Mariusz Kozlowski, akpm, linux-kernel, torvalds
On Wed, 2007-08-15 at 13:44 +0200, Rene Herman wrote:
> On 08/15/2007 11:39 AM, Stefan Richter wrote:
> > Note, maintainer contacts
> > - should be available to patch submitters and
> > - must be available to *problem reporters*
> > without having to have git and a .git repo.
> That "must" seems rather strong. But those few non-developer users that
> could care are served by a MAINTAINERS file generated into releases.
Good idea for scripts to help kernel bug reporters.
REPORTING-BUGS is underutilized as a guide.
I think Bug reporting is a separate issue from patch CC'ing.
I'd rather have MAINTAINERS disappear altogether.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-14 19:33 ` Al Viro
2007-08-14 19:57 ` Joe Perches
2007-08-15 1:19 ` Rene Herman
@ 2007-08-15 19:37 ` Krzysztof Halasa
2007-08-15 23:19 ` Al Viro
2 siblings, 1 reply; 38+ messages in thread
From: Krzysztof Halasa @ 2007-08-15 19:37 UTC (permalink / raw)
To: Al Viro
Cc: Linus Torvalds, Joe Perches, Rene Herman, git, Junio C Hamano,
Alan Cox, Arjan van de Ven, Trond Myklebust, Mariusz Kozlowski,
akpm, linux-kernel
Al Viro <viro@ftp.linux.org.uk> writes:
> I'm not suggesting something like fs.ext2@kernel.org with something
> like majordomo allowing to add yourself to those,
Why not
> but something less
> extreme in that direction might be worth thinking about... Hell,
> even simple
> $ finger fs/minix/dir.c@cc.kernel.org
> with majordomo-like interface for adding yourself to such lists
> might solve most of those problems...
I think so.
And you would be able to add yourself even if you're merely
interested in something, not a maintainer.
However I think the mailing lists could do better. Duplicate
suppression, among other things.
And they could eventually supersede the subsystem mailing lists
we use today. Just use net@kernel.org or drivers.net@kernel.org.
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-15 19:37 ` Krzysztof Halasa
@ 2007-08-15 23:19 ` Al Viro
0 siblings, 0 replies; 38+ messages in thread
From: Al Viro @ 2007-08-15 23:19 UTC (permalink / raw)
To: Krzysztof Halasa
Cc: Linus Torvalds, Joe Perches, Rene Herman, git, Junio C Hamano,
Alan Cox, Arjan van de Ven, Trond Myklebust, Mariusz Kozlowski,
akpm, linux-kernel
On Wed, Aug 15, 2007 at 09:37:45PM +0200, Krzysztof Halasa wrote:
> > I'm not suggesting something like fs.ext2@kernel.org with something
> > like majordomo allowing to add yourself to those,
>
> Why not
You'd need to implement serious anti-spam measures for that. Besides,
cross-postings between random sets of lists would become a nightmare
pretty soon.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-15 13:52 ` Kyle Moffett
@ 2007-08-16 10:58 ` Rene Herman
2007-08-16 11:08 ` Rene Herman
` (2 more replies)
0 siblings, 3 replies; 38+ messages in thread
From: Rene Herman @ 2007-08-16 10:58 UTC (permalink / raw)
To: Kyle Moffett
Cc: Satyam Sharma, Al Viro, Linus Torvalds, Joe Perches, git,
Junio C Hamano, Alan Cox, Arjan van de Ven, Trond Myklebust,
Mariusz Kozlowski, Andrew Morton, Linux Kernel Mailing List
On 08/15/2007 03:52 PM, Kyle Moffett wrote:
> On Aug 15, 2007, at 09:39:44, Rene Herman wrote:
>> On 08/15/2007 03:33 PM, Satyam Sharma wrote:
>>
>> [ git info --maintainer ]
>>
>>> I'd really _love_ a tool that does all that what you've proposed
>>> above! But why does it have to be "git-info" or anything in the
>>> git(7) suite for that matter? This sounds like a job for a different
>>> specialised tool, long with ".metatags" kind of files dispersed in
>>> the source tree.
>>
>> To automatically move (and delete) the meta-data alongside the files
>> themselves is a reason.
>>
>> More generally -- shouldn't it? This is about source management (well,
>> maybe more about project management, but...) and the source code
>> management tool looks to be the right place for that. The different
>> parts of git are somewhat/fairly stand-alone as is, no?
>
> If you were going to do that I'd just suggest making git aware of the
> "user.*" extended attributes and having it save those into the git repo
> along with the permission data.
Am looking at it but am not so sure that's a very good idea. I guess it'd be
largely okay-ish to require the repo to be on a filesystem that supports EAs
for this feature to work, but keeping the attributes intact over file system
operations seems not all that easy (yet). Having not used EAs before I may
be missing something but my version of "cp" for example (GNU coreutils 6.9)
appears to not copy them. Nor do they seem to survive a trip through GNU tar
1.16.1. EAs appear to not be very useful unless every single tool supports
them -- a repo should be resistant against simple operations like that.
Googling around, I see subversion already has this and calls the meta-data
"properties" (svn propset/get and friends). It uses a few properties itself,
such as the svn:executable property (which I saw is also the only permission
bit git keeps) and svn:ignore, which serves the same role as the .gitignore
files for git. Both those would fit into this scheme nicely for git as well,
if git were to do something similar and reserve for example the "git.*"
namespace for internal use.
Junio (and others), do you have an opinion on this? If these properties are
versioned themselves such as in svn I believe it's a decidedly non-trivial
addition (and I'm a complete git newbie) but to me, they look incredibly
useful, both for the original "maintainers" properties (and anyone else one
would want to come up with such as summary properties and author/license
stuff) and even for git internal reasons such as sketched above.
The git-blame thing as sketched before by Linus would never be able to point
out mailing lists, or general lists of "interested parties" for example, but
these properties can do anything...
Rene.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-16 10:58 ` Rene Herman
@ 2007-08-16 11:08 ` Rene Herman
2007-08-16 11:26 ` Salikh Zakirov
2007-08-16 15:40 ` Al Viro
2007-08-16 19:00 ` Junio C Hamano
2 siblings, 1 reply; 38+ messages in thread
From: Rene Herman @ 2007-08-16 11:08 UTC (permalink / raw)
To: Kyle Moffett
Cc: Satyam Sharma, Al Viro, Linus Torvalds, Joe Perches, git,
Junio C Hamano, Alan Cox, Arjan van de Ven, Trond Myklebust,
Mariusz Kozlowski, Andrew Morton, Linux Kernel Mailing List
On 08/16/2007 12:58 PM, Rene Herman wrote:
> On 08/15/2007 03:52 PM, Kyle Moffett wrote:
>> If you were going to do that I'd just suggest making git aware of the
>> "user.*" extended attributes and having it save those into the git
>> repo along with the permission data.
>
> Am looking at it but am not so sure that's a very good idea. I guess
> it'd be largely okay-ish to require the repo to be on a filesystem that
> supports EAs for this feature to work, but keeping the attributes intact
> over file system operations seems not all that easy (yet). Having not
> used EAs before I may be missing something but my version of "cp" for
> example (GNU coreutils 6.9) appears to not copy them. Nor do they seem
> to survive a trip through GNU tar 1.16.1. EAs appear to not be very
> useful unless every single tool supports them -- a repo should be
> resistant against simple operations like that.
>
> Googling around, I see subversion already has this and calls the
> meta-data "properties" (svn propset/get and friends). It uses a few
> properties itself, such as the svn:executable property (which I saw is
> also the only permission bit git keeps) and svn:ignore, which serves the
> same role as the .gitignore files for git. Both those would fit into
> this scheme nicely for git as well, if git were to do something similar
> and reserve for example the "git.*" namespace for internal use.
>
> Junio (and others), do you have an opinion on this? If these properties
> are versioned themselves such as in svn I believe it's a decidedly
> non-trivial addition (and I'm a complete git newbie) but to me, they
> look incredibly useful, both for the original "maintainers" properties
> (and anyone else one would want to come up with such as summary
> properties and author/license stuff) and even for git internal reasons
> such as sketched above.
>
> The git-blame thing as sketched before by Linus would never be able to
> point out mailing lists, or general lists of "interested parties" for
> example, but these properties can do anything...
The svn implemention is that a single property is free-form text. As such, I
guess a property would be just another file, although one that only lives in
the index and is linked from the file/directory it is a property of.
Perhaps that immediately suggests an implementation to someone already
familiar with git internals?
Rene.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-16 11:08 ` Rene Herman
@ 2007-08-16 11:26 ` Salikh Zakirov
2007-08-16 11:57 ` Rene Herman
0 siblings, 1 reply; 38+ messages in thread
From: Salikh Zakirov @ 2007-08-16 11:26 UTC (permalink / raw)
To: git; +Cc: linux-kernel
Rene Herman wrote:
> Perhaps that immediately suggests an implementation to someone already
> familiar with git internals?
perhaps http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
and http://www.kernel.org/pub/software/scm/git/docs/git-check-attr.html
can help you?
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-16 11:26 ` Salikh Zakirov
@ 2007-08-16 11:57 ` Rene Herman
0 siblings, 0 replies; 38+ messages in thread
From: Rene Herman @ 2007-08-16 11:57 UTC (permalink / raw)
To: Salikh Zakirov; +Cc: git, linux-kernel
On 08/16/2007 01:26 PM, Salikh Zakirov wrote:
Please don't drop CCs.
> Rene Herman wrote:
>> Perhaps that immediately suggests an implementation to someone already
>> familiar with git internals?
>
> perhaps http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
> and http://www.kernel.org/pub/software/scm/git/docs/git-check-attr.html
> can help you?
No, thanks, saw them, but .gitattributes is in fact in the same category as
.gitignore, which would _be_ a property.
If you do this stuff in files scattered around the tree, updating and moving
stuff becomes a pain -- the tool would need to go edit files.
Rene.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-16 10:58 ` Rene Herman
2007-08-16 11:08 ` Rene Herman
@ 2007-08-16 15:40 ` Al Viro
2007-08-16 15:53 ` Rene Herman
2007-08-16 19:00 ` Junio C Hamano
2 siblings, 1 reply; 38+ messages in thread
From: Al Viro @ 2007-08-16 15:40 UTC (permalink / raw)
To: Rene Herman
Cc: Kyle Moffett, Satyam Sharma, Linus Torvalds, Joe Perches, git,
Junio C Hamano, Alan Cox, Arjan van de Ven, Trond Myklebust,
Mariusz Kozlowski, Andrew Morton, Linux Kernel Mailing List
On Thu, Aug 16, 2007 at 12:58:19PM +0200, Rene Herman wrote:
> Googling around, I see subversion already has this and calls the meta-data
> "properties" (svn propset/get and friends). It uses a few properties
> itself, such as the svn:executable property (which I saw is also the only
> permission bit git keeps) and svn:ignore, which serves the same role as the
> .gitignore files for git. Both those would fit into this scheme nicely for
> git as well, if git were to do something similar and reserve for example
> the "git.*" namespace for internal use.
"svn does it" is usually an indication of a bad idea, but anyway - it's
fundamentally wrong in this case, simply because "$FOO is interested
in $BAR" is a property of $FOO, not of $BAR.
> The git-blame thing as sketched before by Linus would never be able to
> point out mailing lists, or general lists of "interested parties" for
> example, but these properties can do anything...
No, they can not. "I'm interested in drivers/foo/bar.c fixes" is not
an earth-shattering event and it sure as hell does not create a new revision
of the tree.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-16 15:40 ` Al Viro
@ 2007-08-16 15:53 ` Rene Herman
0 siblings, 0 replies; 38+ messages in thread
From: Rene Herman @ 2007-08-16 15:53 UTC (permalink / raw)
To: Al Viro
Cc: Kyle Moffett, Satyam Sharma, Linus Torvalds, Joe Perches, git,
Junio C Hamano, Alan Cox, Arjan van de Ven, Trond Myklebust,
Mariusz Kozlowski, Andrew Morton, Linux Kernel Mailing List
On 08/16/2007 05:40 PM, Al Viro wrote:
> On Thu, Aug 16, 2007 at 12:58:19PM +0200, Rene Herman wrote:
>> The git-blame thing as sketched before by Linus would never be able to
>> point out mailing lists, or general lists of "interested parties" for
>> example, but these properties can do anything...
>
> No, they can not. "I'm interested in drivers/foo/bar.c fixes" is not
> an earth-shattering event and it sure as hell does not create a new revision
> of the tree.
That's true. Okay, it can't do those general lists of interested parties.
Rene.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-16 10:58 ` Rene Herman
2007-08-16 11:08 ` Rene Herman
2007-08-16 15:40 ` Al Viro
@ 2007-08-16 19:00 ` Junio C Hamano
2007-08-17 4:24 ` Rene Herman
2 siblings, 1 reply; 38+ messages in thread
From: Junio C Hamano @ 2007-08-16 19:00 UTC (permalink / raw)
To: Rene Herman
Cc: Kyle Moffett, Satyam Sharma, Al Viro, Linus Torvalds, Joe Perches,
git, Alan Cox, Arjan van de Ven, Trond Myklebust,
Mariusz Kozlowski, Andrew Morton, Linux Kernel Mailing List
Rene Herman <rene.herman@gmail.com> writes:
> Am looking at it but am not so sure that's a very good idea. I guess
> it'd be largely okay-ish to require the repo to be on a filesystem
> that supports EAs for this feature to work, but keeping the attributes
> intact over file system operations seems not all that easy
> (yet). Having not used EAs before I may be missing something but my
> version of "cp" for example (GNU coreutils 6.9) appears to not copy
> them. Nor do they seem to survive a trip through GNU tar 1.16.1. EAs
> appear to not be very useful unless every single tool supports them --
> a repo should be resistant against simple operations like that.
>
> Googling around, I see subversion already has this and calls the
> meta-data "properties" (svn propset/get and friends). It uses a few
> properties itself, such as the svn:executable property (which I saw is
> also the only permission bit git keeps) and svn:ignore, which serves
> the same role as the .gitignore files for git. Both those would fit
> into this scheme nicely for git as well, if git were to do something
> similar and reserve for example the "git.*" namespace for internal use.
>
> Junio (and others), do you have an opinion on this?
Please step back a bit and imagine a world in which there was no
git. IOW, you kernel folks switched to tarballs and patches 20
months ago. It is a far superiour solution compared to CVS and
SVN, so it ought to work, right ;-)?
Now, would you implement the "whom would I send my patches to"
with EAs?
I would hope not.
Git or no git, I think a file that can be viewed with less,
edited with regular editor and processed with sed/perl/grep
tools is the way to go. I do not think adding 600+ patches to
the single MAINTAINERS list is workable in the longer term, as
it would become the single file many subsystem people need to
update and is asking for merge conflicts, but I think a file
with known name (say, "CcMe.txt") sprinkled in relevant
subdirectories, perhaps with the same format originally
suggested for MAINTAINERS, would make a lot more sense.
That would give people who work with tarballs and patches, or a
subsystem managed with something other than git (one of the most
important one is quilt), the equal access to the necessary data.
Even with git, it is my understanding that kernel community
works largely on patches exchanged over e-mails, between people
who do use git and people who do not. You would want to have
something you can easily transfer over e-mail in the patch
form.
We _could_ invent a new "patches to properties" git diff output
format that "git apply" can understand to propagate that
information, but that approach is making it less interoperable
with others, and you need to demonstrate the benefit far
outweighs that. I do not see it for this particular
application.
There may be places for "properties" that would be useful to
git, but I do not think the "find whom to send patches to" is
one of them.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-14 18:40 ` Linus Torvalds
` (3 preceding siblings ...)
2007-08-15 9:29 ` Stefan Richter
@ 2007-08-16 20:36 ` Joe Perches
4 siblings, 0 replies; 38+ messages in thread
From: Joe Perches @ 2007-08-16 20:36 UTC (permalink / raw)
To: Linus Torvalds
Cc: Rene Herman, git, Junio C Hamano, Alan Cox, Arjan van de Ven,
Trond Myklebust, Mariusz Kozlowski, akpm, linux-kernel
On Tue, 2007-08-14 at 11:40 -0700, Linus Torvalds wrote:
> Do a script like this:
>
> #!/bin/sh
> git log --since=6.months.ago -- "$@" |
> grep -i '^ [-a-z]*by:.*@' |
> sort | uniq -c |
> sort -r -n | head
> (Maybe you want to add a
> grep -v '\(Linus Torvalds\)\|\(Andrew Morton\)'
> to avoid seeing the normal chain too much, but hey, we probably want to
> know too. Anyway - the script can certainly be tweaked, the point is
> really just that the git tree _already_ contains the relevant
> information).
So, here's the same get_maintainer.pl with the git
addition. Seems to work well in combination with MAINTAINERS.
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
new file mode 100755
index 0000000..eb3f023
--- /dev/null
+++ b/scripts/get_maintainer.pl
@@ -0,0 +1,351 @@
+#!/usr/bin/perl -w
+# (c) 2007, Joe Perches <joe@perches.com>
+# created from checkpatch.pl
+#
+# Print the contact information for the maintainers
+# of the files modified in a patch
+#
+# usage: perl scripts/get_maintainers.pl <patch>
+#
+# Licensed under the terms of the GNU GPL License version 2
+
+use strict;
+
+my $P = $0;
+$P =~ s@.*/@@g;
+
+my $V = '0.06';
+
+use Getopt::Long qw(:config no_auto_abbrev);
+
+my $tree = "./";
+my $email_maintainer = 1;
+my $email_usename = 1;
+my $email_list = 1;
+my $email_subscriber_list = 0;
+my $email_separator = ", ";
+my $email_git = 1;
+my $email_git_chief_penguins = 0;
+my $email_multiline = 0;
+my %saw;
+
+my $chief_penguins = "(Linus Torvalds|Andrew Morton)";
+
+GetOptions(
+ 'tree=s' => \$tree,
+ 'git!' => $email_git,
+ 'git-chief-penguins' => \$email_git_chief_penguins,
+ 'm!' => \$email_maintainer,
+ 'n!' => \$email_usename,
+ 'l!' => \$email_list,
+ 's!' => \$email_subscriber_list,
+ 'multiline!' => \$email_multiline,
+ 'separator=s' => \$email_separator,
+ ) or exit;
+
+my $exit = 0;
+
+if ($#ARGV < 0 ||
+ ($email_maintainer == 0
+ && $email_list == 0
+ && $email_subscriber_list == 0
+ && $email_git == 0)) {
+ print "usage: $P [options] patchfile\n";
+ print "version: $V\n";
+ print " --tree [path] => linux kernel source path\n";
+ print " --git => include recent git \*-by: signers\n";
+ print " --git_chief_penguins => include ${chief_penguins}\n";
+ print " --m => include maintainer(s) if any\n";
+ print " --n => include name 'Full Name <addr\@domain.tld>'\n";
+ print " --l => include list(s) if any\n";
+ print " --s => include subscriber only list(s) if any\n";
+ print " --separator [, ] => separator for multiple addresses on 1 line\n";
+ print " --multiline => print 1 address per line\n";
+ print "Default: [--g --m --l --separator \", \"]\n";
+ print "Be sure to select something...\n";
+ exit(1);
+}
+
+if ($tree && !top_of_kernel_tree($tree)) {
+ if (${tree} ne "") {
+ print "'${tree}' ";
+ } else {
+ print "The current directory ";
+ }
+ print "doesn't appear to be a linux kernel source tree\n";
+ exit(2);
+}
+
+## Read MAINTAINERS for type/value pairs
+
+my @typevalue = ();
+open(MAINT, "<${tree}MAINTAINERS") || die "$P: Can't open ${tree}MAINTAINERS\n";
+while (<MAINT>) {
+ if (m/^(\C):\s*(.*)/) {
+ my $type = $1;
+ my $value = $2;
+
+ ##Filename pattern matching
+ if ($type eq "F" || $type eq "X") {
+ $value =~ s@\.@\\\.@g; ##Convert . to \.
+ $value =~ s/\*/\.\*/g; ##Convert * to .*
+ }
+ push(@typevalue, "$type:$value");
+ } elsif (!/^(\s)*$/) {
+ push(@typevalue, $_);
+ }
+}
+close(MAINT);
+
+## Find the patched filenames
+
+my @patchedfiles = ();
+open(PATCH, "<$ARGV[0]") or die "Can't open $ARGV[0]\n";
+while (<PATCH>) {
+ if (m/^\+\+\+\s+(\S+)/) {
+ my $file = $1;
+ $file =~ s@^[^/]*/@@;
+ $file =~ s@\n@@;
+ push(@patchedfiles, $file);
+ }
+}
+close(PATCH);
+
+# Sort and uniq patchedfiles
+
+undef %saw;
+@patchedfiles = sort @patchedfiles;
+@patchedfiles = grep(!$saw{$_}++, @patchedfiles);
+
+# Find responsible parties
+
+my @email_to = ();
+foreach (@patchedfiles) {
+ my $patchedfile = $_;
+ my $exclude = 0;
+
+#Git
+
+ recent_git_signoffs($patchedfile);
+
+#Do not match excluded file patterns
+
+ foreach (@typevalue) {
+ if (m/^(\C):(.*)/) {
+ my $type = $1;
+ my $value = $2;
+ if ($type eq 'X') {
+ if (file_match_pattern($patchedfile, $value)) {
+ $exclude = 1;
+ }
+ }
+ }
+ }
+
+ if ($exclude == 0) {
+ my $tvi = 0;
+ foreach (@typevalue) {
+ if (m/^(\C):(.*)/) {
+ my $type = $1;
+ my $value = $2;
+ if ($type eq 'F') {
+ if (file_match_pattern($patchedfile, $value)) {
+ add_emails($tvi);
+ }
+ }
+ }
+ $tvi++;
+ }
+ }
+}
+
+## sort and uniq email_to
+
+@email_to = sort @email_to;
+undef %saw;
+@email_to = grep(!$saw{$_}++, @email_to);
+
+## add lk if no one is interested...
+
+my $address_cnt = @email_to;
+if ($address_cnt == 0 && $email_list > 0) {
+ push(@email_to, "linux-kernel\@vger.kernel.org");
+}
+if ($email_multiline != 0) {
+ foreach (@email_to) {
+ print("$_\n");
+ }
+} else {
+ print(join($email_separator, @email_to));
+ print("\n");
+}
+
+exit($exit);
+
+sub file_match_pattern {
+ my ($file, $pattern) = @_;
+ if (substr($pattern, -1) eq "/") {
+ if ($file =~ m@^$pattern@) {
+ return 1;
+ }
+ } else {
+ if ($file =~ m@^$pattern@) {
+ my $s1 = ($file =~ tr@/@@);
+ my $s2 = ($pattern =~ tr@/@@);
+ if ($s1 == $s2) {
+ return 1;
+ }
+ }
+ }
+ return 0;
+}
+
+sub top_of_kernel_tree {
+ my ($tree) = @_;
+
+ if ($tree ne "" && substr($tree,length($tree)-1,1) ne "/") {
+ $tree = $tree . "/";
+ }
+ if ( (-f "${tree}COPYING")
+ && (-f "${tree}CREDITS")
+ && (-f "${tree}Kbuild")
+ && (-f "${tree}MAINTAINERS")
+ && (-f "${tree}Makefile")
+ && (-f "${tree}README")
+ && (-d "${tree}Documentation")
+ && (-d "${tree}arch")
+ && (-d "${tree}include")
+ && (-d "${tree}drivers")
+ && (-d "${tree}fs")
+ && (-d "${tree}init")
+ && (-d "${tree}ipc")
+ && (-d "${tree}kernel")
+ && (-d "${tree}lib")
+ && (-d "${tree}scripts")) {
+ return 1;
+ }
+ return 0;
+}
+
+sub format_email {
+ my ($name, $email) = @_;
+ my $formatted_email = $name;
+
+ if ($name =~ /[^a-z0-9 \.\-]/i) { ##has "must quote" chars
+ $name =~ s/(?<!\\)"/\\"/g; ##escape quotes
+ $formatted_email = "\"${name}\"\ \<${email}\>";
+ } else {
+ $formatted_email = "${name} \<${email}\>";
+ }
+ return $formatted_email;
+}
+
+sub add_emails {
+ my ($index) = @_;
+
+ $index = $index - 1;
+ while ($index >= 0) {
+ my $tv = $typevalue[$index];
+ if ($tv =~ m/^(\C):(.*)/) {
+ my $ptype = $1;
+ my $pvalue = $2;
+ if ($ptype eq "L") {
+ my $subscr = $pvalue;
+ if ($subscr =~ m/\s*\(subscribers-only\)/) {
+ if ($email_subscriber_list > 0) {
+ $subscr =~ s/\s*\(subscribers-only\)//g;
+ push(@email_to, $subscr);
+ }
+ } else {
+ if ($email_list > 0) {
+ push(@email_to, $pvalue);
+ }
+ }
+ } elsif ($ptype eq "M") {
+ if ($email_maintainer > 0) {
+ if ($index >= 0) {
+ my $tv = $typevalue[$index - 1];
+ if ($tv =~ m/^(\C):(.*)/) {
+ if ($1 eq "P" && $email_usename > 0) {
+ push(@email_to, format_email($2, $pvalue));
+ } else {
+ push(@email_to, $pvalue);
+ }
+ }
+ } else {
+ push(@email_to, $pvalue);
+ }
+ }
+ }
+ $index--;
+ } else {
+ $index = -1;
+ }
+ }
+}
+
+sub which {
+ my ($bin) = @_;
+
+ my $path;
+
+ foreach $path (split /:/, $ENV{PATH}) {
+ if (-e "$path/$bin") {
+ return "$path/$bin";
+ }
+ }
+
+ return "";
+}
+
+sub recent_git_signoffs {
+ my ($file) = @_;
+
+ my $sign_offs = "";
+ my $cmd = "";
+ my $output = "";
+
+ my @lines = ();
+
+ if (which("git") eq "") {
+ die("Git not found\n");
+ }
+
+# Search the git logs for "by:" lines per file
+# sort in reverse order by occurance
+# add at most 5
+
+ $cmd = "git log --since=6.months.ago -- ${file} ";
+ $cmd = $cmd . " | grep -i '^ [-a-z]*by:.*\\\@' ";
+ if ($email_git_chief_penguins == 0) {
+ $cmd = $cmd . " | grep -E -v '${chief_penguins}'";
+ }
+ $cmd = $cmd . " | sort | uniq -c | sort -r -n | head -n 5";
+ $cmd = $cmd . " | cut -f 2 -d ':' -s ";
+
+ $output = `${cmd}`;
+
+ $output =~ s/^\s*//gm;
+
+ @lines = split("\n", $output);
+ foreach (@lines) {
+ my $line = $_;
+ if ($line =~ m/(.*) <(.*)>/) {
+ my $git_name = $1;
+ my $git_addr = $2;
+ $git_name =~ tr/^\"//;
+ $git_name =~ tr/\"$//;
+ if ($email_usename > 0) {
+ push(@email_to, format_email($git_name, $git_addr));
+ } else {
+ push(@email_to, $git_addr);
+ }
+ } elsif ($line =~ m/<(.*)>/) {
+ my $git_addr = $1;
+ push(@email_to, $git_addr);
+ } else {
+ push(@email_to, $line);
+ }
+ }
+ return $output;
+}
^ permalink raw reply related [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-15 1:31 ` Junio C Hamano
2007-08-15 2:12 ` Joe Perches
@ 2007-08-17 2:13 ` Joe Perches
2007-08-17 2:30 ` Joe Perches
1 sibling, 1 reply; 38+ messages in thread
From: Joe Perches @ 2007-08-17 2:13 UTC (permalink / raw)
To: Junio C Hamano
Cc: Rene Herman, git, Alan Cox, Arjan van de Ven, Trond Myklebust,
Mariusz Kozlowski, akpm, linux-kernel, torvalds
On Tue, 2007-08-14 at 18:31 -0700, Junio C Hamano wrote:
> On the other hand, git-send-email _is_ all about sending it
> out, and it needs to know who your patch should reach. I
> think it makes sense to have one script that, given a set of
> paths that are affected, gives a list of potentially
> interested people (that is "Finding" part -- and I see there
> are 600+ patches to implement this on the list), and a new
> option to git-send-email to (1) inspect the patch to see what
> paths are affected, and (2) call that "Find" script to figure
> out whom to send it to, and probably asking for confirmation.
Sorry, not a git developer, so the paths are wrong.
This seems to work:
Example:
git-send-email \
--cc-cmd "perl scripts/get_maintainers.pl -non -multiline" foo.diff
--- git-send-email.pl 2007-08-16 19:06:07.000000000 -0700
+++ /usr/local/bin/git-send-email 2007-05-01 11:59:14.000000000 -0700
@@ -47,9 +47,6 @@ Options:
--cc Specify an initial "Cc:" list for the entire series
of emails.
- --cc-cmd Specify a command to execute per file which adds
- per file specific cc address entries
-
--bcc Specify a list of email addresses that should be Bcc:
on all the emails.
@@ -143,7 +140,7 @@ my (@to,@cc,@initial_cc,@bcclist,@xh,
# Behavior modification variables
my ($chain_reply_to, $quiet, $suppress_from, $no_signed_off_cc,
- $dry_run, $cc_cmd) = (1, 0, 0, 0, 0, 0);
+ $dry_run) = (1, 0, 0, 0, 0);
my $smtp_server;
my $envelope_sender;
@@ -176,7 +173,6 @@ my $rc = GetOptions("from=s" => \$from,
"subject=s" => \$initial_subject,
"to=s" => \@to,
"cc=s" => \@initial_cc,
- "cc-cmd=s" => \$cc_cmd,
"bcc=s" => \@bcclist,
"chain-reply-to!" => \$chain_reply_to,
"smtp-server=s" => \$smtp_server,
@@ -611,16 +607,6 @@ foreach my $t (@files) {
}
}
close F;
-
- if (${cc_cmd} ne "") {
- my $output = `${cc_cmd} $t`;
- my @lines = split("\n", $output);
- foreach my $c (@lines) {
- push @cc, $c;
- printf("(sob) Adding cc: %s from cc-cmd: '%s'\n", $c, $t) unless $quiet;
- }
- }
-
if (defined $author_not_sender) {
$author_not_sender = unquote_rfc2047($author_not_sender);
$message = "From: $author_not_sender\n\n$message";
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-17 2:13 ` Joe Perches
@ 2007-08-17 2:30 ` Joe Perches
2007-08-17 17:54 ` [PATCH] - git-send-email.perl Joe Perches
0 siblings, 1 reply; 38+ messages in thread
From: Joe Perches @ 2007-08-17 2:30 UTC (permalink / raw)
To: Junio C Hamano
Cc: Rene Herman, git, Alan Cox, Arjan van de Ven, Trond Myklebust,
Mariusz Kozlowski, akpm, linux-kernel, torvalds
On Thu, 2007-08-16 at 19:13 -0700, Joe Perches wrote:
> Sorry, not a git developer, so the paths are wrong.
> This seems to work:
Sorry. Patch reversed too.
--- /usr/local/bin/git-send-email 2007-05-01 11:59:14.000000000 -0700
+++ /home/joe/bin/git-send-email.pl 2007-08-16 19:25:53.000000000 -0700
@@ -47,6 +47,9 @@ Options:
--cc Specify an initial "Cc:" list for the entire series
of emails.
+ --cc-cmd Specify a command to execute per file which adds
+ per file specific cc address entries
+
--bcc Specify a list of email addresses that should be Bcc:
on all the emails.
@@ -140,7 +143,7 @@ my (@to,@cc,@initial_cc,@bcclist,@xh,
# Behavior modification variables
my ($chain_reply_to, $quiet, $suppress_from, $no_signed_off_cc,
- $dry_run) = (1, 0, 0, 0, 0);
+ $dry_run, $cc_cmd) = (1, 0, 0, 0, 0, "");
my $smtp_server;
my $envelope_sender;
@@ -173,6 +176,7 @@ my $rc = GetOptions("from=s" => \$from,
"subject=s" => \$initial_subject,
"to=s" => \@to,
"cc=s" => \@initial_cc,
+ "cc-cmd=s" => \$cc_cmd,
"bcc=s" => \@bcclist,
"chain-reply-to!" => \$chain_reply_to,
"smtp-server=s" => \$smtp_server,
@@ -607,6 +611,16 @@ foreach my $t (@files) {
}
}
close F;
+
+ if (${cc_cmd} ne "") {
+ my $output = `${cc_cmd} $t`;
+ my @lines = split("\n", $output);
+ foreach my $c (@lines) {
+ push @cc, $c;
+ printf("(sob) Adding cc: %s from cc-cmd: '%s'\n", $c, $t) unless $quiet;
+ }
+ }
+
if (defined $author_not_sender) {
$author_not_sender = unquote_rfc2047($author_not_sender);
$message = "From: $author_not_sender\n\n$message";
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl
2007-08-16 19:00 ` Junio C Hamano
@ 2007-08-17 4:24 ` Rene Herman
0 siblings, 0 replies; 38+ messages in thread
From: Rene Herman @ 2007-08-17 4:24 UTC (permalink / raw)
To: Junio C Hamano
Cc: Kyle Moffett, Satyam Sharma, Al Viro, Linus Torvalds, Joe Perches,
git, Alan Cox, Arjan van de Ven, Trond Myklebust,
Mariusz Kozlowski, Andrew Morton, Linux Kernel Mailing List
On 08/16/2007 09:00 PM, Junio C Hamano wrote:
> Git or no git, I think a file that can be viewed with less,
> edited with regular editor and processed with sed/perl/grep
> tools is the way to go. I do not think adding 600+ patches to
> the single MAINTAINERS list is workable in the longer term, as
> it would become the single file many subsystem people need to
> update and is asking for merge conflicts, but I think a file
> with known name (say, "CcMe.txt") sprinkled in relevant
> subdirectories, perhaps with the same format originally
> suggested for MAINTAINERS, would make a lot more sense.
>
> That would give people who work with tarballs and patches, or a
> subsystem managed with something other than git (one of the most
> important one is quilt), the equal access to the necessary data.
That is ofcourse an argument but I believe a bit of a non-argument at the
same time in practice.
There's really not much point in pretending that non-git users are still
first class citizens anyway; Linus' own suggestion of using git-blame would
tie things to git as well, as do for example frequent requests to bisect a
problem. I moreover feel there's absolutely nothing wrong with that, given
that there's nothing wrong with git.
It's the kernel's source code management tool, is included out of the box in
most distributions nowadays and is GPLd meaning that the tool (itself) won't
keep anyone from exporting data from it and importing it into something else
if someone cares to. Also, I never managed to stay un-annoyed at source code
management tools long enough to understand why I wanted to use them but have
been using git for months now so as far as I am concerned, it appears to
even be a good tool.
But, well, anyways, I did look at a git repo a bit but will unfortunately
not be able to follow up the proposal with actual (good) code in a sensible
timeframe, let alone "quickly", which means I was hoping others would agree.
I believe these properties make for an elegant setup with many possible uses
including the maintainers information, but if you disagree I guess I'm going
to shelve it...
> Even with git, it is my understanding that kernel community
> works largely on patches exchanged over e-mails, between people
> who do use git and people who do not. You would want to have
> something you can easily transfer over e-mail in the patch
> form.
>
> We _could_ invent a new "patches to properties" git diff output
> format that "git apply" can understand to propagate that
> information
Yes, not unlike the current git move "meta-diffs" ...
> but that approach is making it less interoperable with others, and you
> need to demonstrate the benefit far outweighs that. I do not see it for
> this particular application.
>
> There may be places for "properties" that would be useful to git, but I
> do not think the "find whom to send patches to" is one of them.
The important reason for wiring this into git directly would be keeping the
meta-data in sync with the data it refers to in an automated fashion. With
manual intervention, there's much more opportunity for things to grow stale.
In practice, it may not be a huge problem. It certainly is with the current
MAINTAINERS file but if one does finer-grained data around the tree, that
will probably help.
It's also not a now or never thing fortunately. If git does ever grow these
properties, the issue can be revisited, perhaps at that time both with the
experience of what the finer-grained in-tree solution did not solve and even
fewer people around that care about not making git even more of an intrinsic
part of development.
Rene.
^ permalink raw reply [flat|nested] 38+ messages in thread
* [PATCH] - git-send-email.perl
2007-08-17 2:30 ` Joe Perches
@ 2007-08-17 17:54 ` Joe Perches
2007-08-17 23:38 ` Junio C Hamano
0 siblings, 1 reply; 38+ messages in thread
From: Joe Perches @ 2007-08-17 17:54 UTC (permalink / raw)
To: Junio C Hamano
Cc: Rene Herman, git, Alan Cox, Arjan van de Ven, Trond Myklebust,
Mariusz Kozlowski, akpm, linux-kernel, torvalds
Here's a path to enable a command line option
that takes a string argument
cc-cmd
This modifies the @cc array to include whatever
output is produced by cc_cmd $patchfile
cccmd can be stored in a config settings file
previous versions of this patch were submitted
against an older version of git-send-email.perl
diff --git a/git-send-email.perl b/git-send-email.perl
index 69559b2..828a77a 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -46,6 +46,9 @@ Options:
--cc Specify an initial "Cc:" list for the entire series
of emails.
+ --cc-cmd Specify a command to execute per file which adds
+ per file specific cc address entries
+
--bcc Specify a list of email addresses that should be Bcc:
on all the emails.
@@ -157,13 +160,14 @@ if ($@) {
my ($quiet, $dry_run) = (0, 0);
# Variables with corresponding config settings
-my ($thread, $chain_reply_to, $suppress_from, $signed_off_cc);
+my ($thread, $chain_reply_to, $suppress_from, $signed_off_cc, $cc_cmd);
my %config_settings = (
"thread" => [\$thread, 1],
"chainreplyto" => [\$chain_reply_to, 1],
"suppressfrom" => [\$suppress_from, 0],
"signedoffcc" => [\$signed_off_cc, 1],
+ "cccmd" => [\$cc_cmd, ""],
);
foreach my $setting (keys %config_settings) {
@@ -189,6 +193,7 @@ my $rc = GetOptions("sender|from=s" => \$sender,
"smtp-server=s" => \$smtp_server,
"compose" => \$compose,
"quiet" => \$quiet,
+ "cc-cmd=s" => \$cc_cmd,
"suppress-from!" => \$suppress_from,
"signed-off-cc|signed-off-by-cc!" => \$signed_off_cc,
"dry-run" => \$dry_run,
@@ -652,11 +657,21 @@ foreach my $t (@files) {
}
}
close F;
+
+ if (${cc_cmd} ne "") {
+ my $output = `${cc_cmd} $t`;
+ my @lines = split("\n", $output);
+ foreach my $c (@lines) {
+ push @cc, $c;
+ printf("(cc-cmd) Adding cc: %s from: '%s'\n", $c, $cc_cmd)
+ unless $quiet;
+ }
+ }
+
if (defined $author) {
$message = "From: $author\n\n$message";
}
-
send_message();
# set up for the next message
^ permalink raw reply related [flat|nested] 38+ messages in thread
* Re: [PATCH] - git-send-email.perl
2007-08-17 17:54 ` [PATCH] - git-send-email.perl Joe Perches
@ 2007-08-17 23:38 ` Junio C Hamano
2007-08-18 1:51 ` Joe Perches
0 siblings, 1 reply; 38+ messages in thread
From: Junio C Hamano @ 2007-08-17 23:38 UTC (permalink / raw)
To: Joe Perches
Cc: Rene Herman, git, Alan Cox, Arjan van de Ven, Trond Myklebust,
Mariusz Kozlowski, akpm, linux-kernel, torvalds
Joe Perches <joe@perches.com> writes:
> Here's a path to enable a command line option
> that takes a string argument
>
> cc-cmd
>
> This modifies the @cc array to include whatever
> output is produced by cc_cmd $patchfile
>
> cccmd can be stored in a config settings file
>
> previous versions of this patch were submitted
> against an older version of git-send-email.perl
... Signed-off-by: ...
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 69559b2..828a77a 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -46,6 +46,9 @@ Options:
> --cc Specify an initial "Cc:" list for the entire series
> of emails.
>
> + --cc-cmd Specify a command to execute per file which adds
> + per file specific cc address entries
> +
> --bcc Specify a list of email addresses that should be Bcc:
> on all the emails.
>
I do not see a patch to "Documentation/git-send-email.txt" here...
> @@ -652,11 +657,21 @@ foreach my $t (@files) {
> }
> }
> close F;
> +
> + if (${cc_cmd} ne "") {
> + my $output = `${cc_cmd} $t`;
> + my @lines = split("\n", $output);
> + foreach my $c (@lines) {
> + push @cc, $c;
> + printf("(cc-cmd) Adding cc: %s from: '%s'\n", $c, $cc_cmd)
> + unless $quiet;
> + }
> + }
> +
Something like this, with appropriate error checking, perhaps?
open my $cc, "${cc_cmd} $t |";
while (my $c = <$cc>) {
...
}
close $cc;
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH] - git-send-email.perl
2007-08-17 23:38 ` Junio C Hamano
@ 2007-08-18 1:51 ` Joe Perches
0 siblings, 0 replies; 38+ messages in thread
From: Joe Perches @ 2007-08-18 1:51 UTC (permalink / raw)
To: Junio C Hamano
Cc: Rene Herman, git, Alan Cox, Arjan van de Ven, Trond Myklebust,
Mariusz Kozlowski, akpm, linux-kernel, torvalds
On Fri, 2007-08-17 at 16:38 -0700, Junio C Hamano wrote:
> Joe Perches <joe@perches.com> writes:
> ... Signed-off-by: ...
> I do not see a patch to "Documentation/git-send-email.txt" here...
> Something like this, with appropriate error checking, perhaps?
>
> open my $cc, "${cc_cmd} $t |";
> while (my $c = <$cc>) {
> ...
> }
> close $cc;
Add --cc-cmd, the ability to execute an arbitrary "cmd" to
generate per patch file specific "Cc:"s to git-send-email.perl
Signed-off-by: Joe Perches <joe@perches.com>
diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index d243ed1..9a48847 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -34,6 +34,12 @@ The --bcc option must be repeated for each user you want on the bcc list.
+
The --cc option must be repeated for each user you want on the cc list.
+--cc-cmd::
+ Specify a command to execute once per patch file which
+ should generate patch file specific "Cc:" entries.
+ Output of this command must be single email address per line.
+ Default is the value of 'sendemail.cccmd' configuration value.
+
--chain-reply-to, --no-chain-reply-to::
If this is set, each email will be sent as a reply to the previous
email sent. If disabled with "--no-chain-reply-to", all emails after
@@ -124,6 +130,9 @@ sendemail.aliasfiletype::
Format of the file(s) specified in sendemail.aliasesfile. Must be
one of 'mutt', 'mailrc', 'pine', or 'gnus'.
+sendemail.cccmd::
+ Command to execute to generate per patch file specific "Cc:"s.
+
sendemail.bcc::
Email address (or alias) to always bcc.
diff --git a/git-send-email.perl b/git-send-email.perl
index 69559b2..d49947c 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -46,6 +46,9 @@ Options:
--cc Specify an initial "Cc:" list for the entire series
of emails.
+ --cc-cmd Specify a command to execute per file which adds
+ per file specific cc address entries
+
--bcc Specify a list of email addresses that should be Bcc:
on all the emails.
@@ -157,13 +160,14 @@ if ($@) {
my ($quiet, $dry_run) = (0, 0);
# Variables with corresponding config settings
-my ($thread, $chain_reply_to, $suppress_from, $signed_off_cc);
+my ($thread, $chain_reply_to, $suppress_from, $signed_off_cc, $cc_cmd);
my %config_settings = (
"thread" => [\$thread, 1],
"chainreplyto" => [\$chain_reply_to, 1],
"suppressfrom" => [\$suppress_from, 0],
"signedoffcc" => [\$signed_off_cc, 1],
+ "cccmd" => [\$cc_cmd, ""],
);
foreach my $setting (keys %config_settings) {
@@ -189,6 +193,7 @@ my $rc = GetOptions("sender|from=s" => \$sender,
"smtp-server=s" => \$smtp_server,
"compose" => \$compose,
"quiet" => \$quiet,
+ "cc-cmd=s" => \$cc_cmd,
"suppress-from!" => \$suppress_from,
"signed-off-cc|signed-off-by-cc!" => \$signed_off_cc,
"dry-run" => \$dry_run,
@@ -652,11 +657,25 @@ foreach my $t (@files) {
}
}
close F;
+
+ if (${cc_cmd} ne "") {
+ open(F, "${cc_cmd} $t |")
+ or die "(cc-cmd) Could not execute '${cc_cmd}'\n";
+ while(<F>) {
+ my $c = $_;
+ $c =~ s/^\s*//g;
+ $c =~ s/\n$//g;
+ push @cc, $c;
+ printf("(cc-cmd) Adding cc: %s from: '%s'\n", $c, $cc_cmd)
+ unless $quiet;
+ }
+ close F;
+ }
+
if (defined $author) {
$message = "From: $author\n\n$message";
}
-
send_message();
# set up for the next message
^ permalink raw reply related [flat|nested] 38+ messages in thread
end of thread, other threads:[~2007-08-18 1:52 UTC | newest]
Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1186984174.10249.7.camel@localhost>
[not found] ` <200708131933.10125.m.kozlowski@tuxland.pl>
[not found] ` <1187026955.2688.4.camel@laptopd505.fenrus.org>
[not found] ` <1187037445.6628.98.camel@heimdal.trondhjem.org>
[not found] ` <1187054366.2757.0.camel@laptopd505.fenrus.org>
[not found] ` <46C10AA8.3090505@gmail.com>
[not found] ` <20070814102033.604c8695@the-village.bc.nu>
[not found] ` <46C1CFFE.4000001@gmail.com>
2007-08-14 17:00 ` [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl Joe Perches
2007-08-14 18:03 ` Rene Herman
2007-08-14 18:28 ` Joe Perches
2007-08-14 18:33 ` Rene Herman
2007-08-14 18:40 ` Linus Torvalds
2007-08-14 18:54 ` Joe Perches
2007-08-14 19:33 ` Al Viro
2007-08-14 19:57 ` Joe Perches
2007-08-15 1:19 ` Rene Herman
2007-08-15 13:33 ` Satyam Sharma
2007-08-15 13:39 ` Rene Herman
2007-08-15 13:52 ` Kyle Moffett
2007-08-16 10:58 ` Rene Herman
2007-08-16 11:08 ` Rene Herman
2007-08-16 11:26 ` Salikh Zakirov
2007-08-16 11:57 ` Rene Herman
2007-08-16 15:40 ` Al Viro
2007-08-16 15:53 ` Rene Herman
2007-08-16 19:00 ` Junio C Hamano
2007-08-17 4:24 ` Rene Herman
2007-08-15 19:37 ` Krzysztof Halasa
2007-08-15 23:19 ` Al Viro
2007-08-15 1:35 ` Richard Knutsson
2007-08-15 9:29 ` Stefan Richter
2007-08-15 15:31 ` Ray Lee
2007-08-16 20:36 ` Joe Perches
2007-08-15 1:31 ` Junio C Hamano
2007-08-15 2:12 ` Joe Perches
2007-08-15 5:25 ` Junio C Hamano
2007-08-15 5:42 ` Rene Herman
2007-08-15 9:39 ` Stefan Richter
2007-08-15 11:44 ` Rene Herman
2007-08-15 17:26 ` Joe Perches
2007-08-17 2:13 ` Joe Perches
2007-08-17 2:30 ` Joe Perches
2007-08-17 17:54 ` [PATCH] - git-send-email.perl Joe Perches
2007-08-17 23:38 ` Junio C Hamano
2007-08-18 1:51 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).