login
Header Space

 
 

RFC: make MAINTAINERS email addresses easier to copy/paste

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>
Date: Tuesday, April 29, 2008 - 4:59 pm

I like to use display names for email addresses, e.g.,
"Bjorn Helgaas <bjorn.helgaas@hp.com>" instead of just
"bjorn.helgaas@hp.com".

The current MAINTAINERS file format makes it a nuisance to
copy both the display name and the actual address.  So
I propose that we fold together the current "P:" and "M:"
lines using something similar to the filter below.

If we do this, we should fix a few inconsistencies in the
current file first so the script will work better.  I'll post
a patch to do that as a response to this message.

Bjorn


#!/usr/bin/perl

# Combine name and email address for easier copy and paste.
# For example, this:
#
#	P:	Bjorn Helgaas
#	M:	bjorn.helgaas@hp.com
#
# becomes this:
#
#	P:	Bjorn Helgaas <bjorn.helgaas@hp.com>

while (<>) {
    if (/^P:(\t|\s{2,})(\S.+)/) {
	if (defined($line)) {
	    print $line;
	    undef $line;
	}
	$name = $2;
	$line = $_;
    } elsif (/^M:(\t|\s{2,}).*?(\S+@\S+)/) {
	if (defined($line)) {
	    $mail = $2;
	    $mail =~ s/^<//;
	    $mail =~ s/>$//;
	    print "P:\t$name <$mail>\n";
	    undef $line;
	} else {
	    print;
	}
    } else {
	if (defined($line)) {
	    print $line;
	    undef $line;
	}
	print;
    }
}
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
RFC: make MAINTAINERS email addresses easier to copy/paste, Bjorn Helgaas, (Tue Apr 29, 4:59 pm)
Re: RFC: make MAINTAINERS email addresses easier to copy/paste, Christoph Hellwig, (Wed Apr 30, 4:49 am)
Re: RFC: make MAINTAINERS email addresses easier to copy/paste, Christoph Hellwig, (Wed Apr 30, 12:04 pm)
speck-geostationary