Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186257
b: refs/heads/master
c: 64f77f3
h: refs/heads/master
i:
  186255: 8224f68
v: v3
  • Loading branch information
Joe Perches authored and Linus Torvalds committed Mar 6, 2010
1 parent 84b6849 commit 996b76d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f11e9a1534c5e9dd4be97b30e6b24902e0ec325b
refs/heads/master: 64f77f312b15f101bf6c4c65d5359ccc16e3f82b
26 changes: 15 additions & 11 deletions trunk/scripts/get_maintainer.pl
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
'fe|file-emails!' => \$file_emails,
'f|file' => \$from_filename,
'v|version' => \$version,
'h|help' => \$help,
'h|help|usage' => \$help,
)) {
die "$P: invalid argument - use --help if necessary\n";
}
Expand All @@ -141,9 +141,9 @@
exit 0;
}

if ($#ARGV < 0) {
usage();
die "$P: argument missing: patchfile or -f file please\n";
if (-t STDIN && !@ARGV) {
# We're talking to a terminal, but have no command line arguments.
die "$P: missing patchfile or -f file - use --help if necessary\n";
}

if ($output_separator ne ", ") {
Expand All @@ -165,15 +165,13 @@
} else {
my $selections = $email + $scm + $status + $subsystem + $web;
if ($selections == 0) {
usage();
die "$P: Missing required option: email, scm, status, subsystem or web\n";
}
}

if ($email &&
($email_maintainer + $email_list + $email_subscriber_list +
$email_git + $email_git_penguin_chiefs + $email_git_blame) == 0) {
usage();
die "$P: Please select at least 1 email option\n";
}

Expand Down Expand Up @@ -248,12 +246,18 @@
my @keyword_tvi = ();
my @file_emails = ();

if (!@ARGV) {
push(@ARGV, "&STDIN");
}

foreach my $file (@ARGV) {
##if $file is a directory and it lacks a trailing slash, add one
if ((-d $file)) {
$file =~ s@([^/])$@$1/@;
} elsif (!(-f $file)) {
die "$P: file '${file}' not found\n";
if ($file ne "&STDIN") {
##if $file is a directory and it lacks a trailing slash, add one
if ((-d $file)) {
$file =~ s@([^/])$@$1/@;
} elsif (!(-f $file)) {
die "$P: file '${file}' not found\n";
}
}
if ($from_filename) {
push(@files, $file);
Expand Down

0 comments on commit 996b76d

Please sign in to comment.