Commit 47abc722 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds

scripts/get_maintainer.pl: correct indentation in a few places

And a miscellaneous conversion of You to you in a help message
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Cc: Florian Mickler <florian@mickler.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7fa8ff2e
...@@ -306,7 +306,7 @@ sub read_mailmap { ...@@ -306,7 +306,7 @@ sub read_mailmap {
my $mailmap = { my $mailmap = {
names => {}, names => {},
addresses => {} addresses => {}
}; };
if (!$email_remove_duplicates) { if (!$email_remove_duplicates) {
return $mailmap; return $mailmap;
...@@ -327,39 +327,39 @@ sub read_mailmap { ...@@ -327,39 +327,39 @@ sub read_mailmap {
# name1 <mail1> name2 <mail2> # name1 <mail1> name2 <mail2>
# (see man git-shortlog) # (see man git-shortlog)
if (/^(.+)<(.+)>$/) { if (/^(.+)<(.+)>$/) {
my $real_name = $1; my $real_name = $1;
my $address = $2; my $address = $2;
$real_name =~ s/\s+$//; $real_name =~ s/\s+$//;
$mailmap->{names}->{$address} = $real_name; $mailmap->{names}->{$address} = $real_name;
} elsif (/^<([^\s]+)>\s*<([^\s]+)>$/) { } elsif (/^<([^\s]+)>\s*<([^\s]+)>$/) {
my $real_address = $1; my $real_address = $1;
my $wrong_address = $2; my $wrong_address = $2;
$mailmap->{addresses}->{$wrong_address} = $real_address; $mailmap->{addresses}->{$wrong_address} = $real_address;
} elsif (/^(.+)<([^\s]+)>\s*<([^\s]+)>$/) { } elsif (/^(.+)<([^\s]+)>\s*<([^\s]+)>$/) {
my $real_name= $1; my $real_name= $1;
my $real_address = $2; my $real_address = $2;
my $wrong_address = $3; my $wrong_address = $3;
$real_name =~ s/\s+$//; $real_name =~ s/\s+$//;
$mailmap->{names}->{$wrong_address} = $real_name; $mailmap->{names}->{$wrong_address} = $real_name;
$mailmap->{addresses}->{$wrong_address} = $real_address; $mailmap->{addresses}->{$wrong_address} = $real_address;
} elsif (/^(.+)<([^\s]+)>\s*([^\s].*)<([^\s]+)>$/) { } elsif (/^(.+)<([^\s]+)>\s*([^\s].*)<([^\s]+)>$/) {
my $real_name = $1; my $real_name = $1;
my $real_address = $2; my $real_address = $2;
my $wrong_name = $3; my $wrong_name = $3;
my $wrong_address = $4; my $wrong_address = $4;
$real_name =~ s/\s+$//; $real_name =~ s/\s+$//;
$wrong_name =~ s/\s+$//; $wrong_name =~ s/\s+$//;
$mailmap->{names}->{format_email($wrong_name,$wrong_address,1)} = $real_name; $mailmap->{names}->{format_email($wrong_name,$wrong_address,1)} = $real_name;
$mailmap->{addresses}->{format_email($wrong_name,$wrong_address,1)} = $real_address; $mailmap->{addresses}->{format_email($wrong_name,$wrong_address,1)} = $real_address;
} }
} }
close($mailmap_file); close($mailmap_file);
...@@ -743,30 +743,30 @@ EOT ...@@ -743,30 +743,30 @@ EOT
} }
sub top_of_kernel_tree { sub top_of_kernel_tree {
my ($lk_path) = @_; my ($lk_path) = @_;
if ($lk_path ne "" && substr($lk_path,length($lk_path)-1,1) ne "/") { if ($lk_path ne "" && substr($lk_path,length($lk_path)-1,1) ne "/") {
$lk_path .= "/"; $lk_path .= "/";
} }
if ( (-f "${lk_path}COPYING") if ( (-f "${lk_path}COPYING")
&& (-f "${lk_path}CREDITS") && (-f "${lk_path}CREDITS")
&& (-f "${lk_path}Kbuild") && (-f "${lk_path}Kbuild")
&& (-f "${lk_path}MAINTAINERS") && (-f "${lk_path}MAINTAINERS")
&& (-f "${lk_path}Makefile") && (-f "${lk_path}Makefile")
&& (-f "${lk_path}README") && (-f "${lk_path}README")
&& (-d "${lk_path}Documentation") && (-d "${lk_path}Documentation")
&& (-d "${lk_path}arch") && (-d "${lk_path}arch")
&& (-d "${lk_path}include") && (-d "${lk_path}include")
&& (-d "${lk_path}drivers") && (-d "${lk_path}drivers")
&& (-d "${lk_path}fs") && (-d "${lk_path}fs")
&& (-d "${lk_path}init") && (-d "${lk_path}init")
&& (-d "${lk_path}ipc") && (-d "${lk_path}ipc")
&& (-d "${lk_path}kernel") && (-d "${lk_path}kernel")
&& (-d "${lk_path}lib") && (-d "${lk_path}lib")
&& (-d "${lk_path}scripts")) { && (-d "${lk_path}scripts")) {
return 1; return 1;
} }
return 0; return 0;
} }
sub parse_email { sub parse_email {
...@@ -1107,29 +1107,30 @@ sub which_conf { ...@@ -1107,29 +1107,30 @@ sub which_conf {
} }
sub mailmap_email { sub mailmap_email {
my $line = shift; my $line = shift;
my ($name, $address) = parse_email($line); my ($name, $address) = parse_email($line);
my $email = format_email($name, $address, 1); my $email = format_email($name, $address, 1);
my $real_name = $name; my $real_name = $name;
my $real_address = $address; my $real_address = $address;
if (exists $mailmap->{names}->{$email} || exists $mailmap->{addresses}->{$email}) { if (exists $mailmap->{names}->{$email} ||
if (exists $mailmap->{names}->{$email}) { exists $mailmap->{addresses}->{$email}) {
$real_name = $mailmap->{names}->{$email}; if (exists $mailmap->{names}->{$email}) {
} $real_name = $mailmap->{names}->{$email};
if (exists $mailmap->{addresses}->{$email}) { }
$real_address = $mailmap->{addresses}->{$email}; if (exists $mailmap->{addresses}->{$email}) {
} $real_address = $mailmap->{addresses}->{$email};
} else { }
if (exists $mailmap->{names}->{$address}) { } else {
$real_name = $mailmap->{names}->{$address}; if (exists $mailmap->{names}->{$address}) {
} $real_name = $mailmap->{names}->{$address};
if (exists $mailmap->{addresses}->{$address}) { }
$real_address = $mailmap->{addresses}->{$address}; if (exists $mailmap->{addresses}->{$address}) {
} $real_address = $mailmap->{addresses}->{$address};
} }
return format_email($real_name, $real_address, 1); }
return format_email($real_name, $real_address, 1);
} }
sub mailmap { sub mailmap {
...@@ -1146,18 +1147,17 @@ sub mailmap { ...@@ -1146,18 +1147,17 @@ sub mailmap {
} }
sub merge_by_realname { sub merge_by_realname {
my %address_map; my %address_map;
my (@emails) = @_; my (@emails) = @_;
foreach my $email (@emails) { foreach my $email (@emails) {
my ($name, $address) = parse_email($email); my ($name, $address) = parse_email($email);
if (!exists $address_map{$name}) { if (!exists $address_map{$name}) {
$address_map{$name} = $address; $address_map{$name} = $address;
} else { } else {
$address = $address_map{$name}; $address = $address_map{$name};
$email = format_email($name,$address,1); $email = format_email($name,$address,1);
}
} }
}
} }
sub git_execute_cmd { sub git_execute_cmd {
...@@ -1555,7 +1555,7 @@ commit signers and mailing lists that could be CC'd on a patch. ...@@ -1555,7 +1555,7 @@ commit signers and mailing lists that could be CC'd on a patch.
Any *'d entry is selected. Any *'d entry is selected.
If you have git or hg installed, You can choose to summarize the commit If you have git or hg installed, you can choose to summarize the commit
history of files in the patch. Also, each line of the current file can history of files in the patch. Also, each line of the current file can
be matched to its commit author and that commits signers with blame. be matched to its commit author and that commits signers with blame.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment