Skip to content

Commit

Permalink
scripts/get_maintainer.pl: warn on missing git or git repository
Browse files Browse the repository at this point in the history
support older versions of grep (use -E not -P)
no need to return data in routine recent_git_signoffs

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Joe Perches authored and Linus Torvalds committed Jun 17, 2009
1 parent f5f5078 commit de2fc49
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions scripts/get_maintainer.pl
Original file line number Diff line number Diff line change
Expand Up @@ -443,11 +443,21 @@ sub recent_git_signoffs {
my @lines = ();

if (which("git") eq "") {
die("$P: git not found. Add --nogit to options?\n");
warn("$P: git not found. Add --nogit to options?\n");
return;
}
if (!(-d ".git")) {
warn("$P: .git repository not found.\n");
warn("Use a .git repository for better results.\n");
warn("ie: git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git\n");
return;
}

$cmd = "git log --since=${email_git_since} -- ${file}";
$cmd .= " | grep -Pi \"^[-_ a-z]+by:.*\\\@.*\$\"";
$cmd .= " | grep -Ei \"^[-_ a-z]+by:.*\\\@.*\$\"";
if (!$email_git_penguin_chiefs) {
$cmd .= " | grep -Ev \"${penguin_chiefs}\"";
}
$cmd .= " | cut -f2- -d\":\"";
$cmd .= " | sort | uniq -c | sort -rn";

Expand Down Expand Up @@ -486,7 +496,6 @@ sub recent_git_signoffs {
push(@email_to, $line);
}
}
return $output;
}

sub uniq {
Expand Down

0 comments on commit de2fc49

Please sign in to comment.