aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2009-06-16 18:34:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-16 22:47:53 -0400
commitde2fc4922b7db1f5099585f821f854a86b5828eb (patch)
tree33615c89c483f1d8a140dc93f7cc3de06c01fd32 /scripts
parentf5f5078db2c61bf42ed20527731c0a23bed86c11 (diff)
scripts/get_maintainer.pl: warn on missing git or git repository
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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/get_maintainer.pl15
1 files changed, 12 insertions, 3 deletions
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 1eb67fc543df..22c7f4e740f1 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -443,11 +443,21 @@ sub recent_git_signoffs {
443 my @lines = (); 443 my @lines = ();
444 444
445 if (which("git") eq "") { 445 if (which("git") eq "") {
446 die("$P: git not found. Add --nogit to options?\n"); 446 warn("$P: git not found. Add --nogit to options?\n");
447 return;
448 }
449 if (!(-d ".git")) {
450 warn("$P: .git repository not found.\n");
451 warn("Use a .git repository for better results.\n");
452 warn("ie: git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git\n");
453 return;
447 } 454 }
448 455
449 $cmd = "git log --since=${email_git_since} -- ${file}"; 456 $cmd = "git log --since=${email_git_since} -- ${file}";
450 $cmd .= " | grep -Pi \"^[-_ a-z]+by:.*\\\@.*\$\""; 457 $cmd .= " | grep -Ei \"^[-_ a-z]+by:.*\\\@.*\$\"";
458 if (!$email_git_penguin_chiefs) {
459 $cmd .= " | grep -Ev \"${penguin_chiefs}\"";
460 }
451 $cmd .= " | cut -f2- -d\":\""; 461 $cmd .= " | cut -f2- -d\":\"";
452 $cmd .= " | sort | uniq -c | sort -rn"; 462 $cmd .= " | sort | uniq -c | sort -rn";
453 463
@@ -486,7 +496,6 @@ sub recent_git_signoffs {
486 push(@email_to, $line); 496 push(@email_to, $line);
487 } 497 }
488 } 498 }
489 return $output;
490} 499}
491 500
492sub uniq { 501sub uniq {