Commit de2fc4922b7db1f5099585f821f854a86b5828eb
Committed by
Linus Torvalds
1 parent
f5f5078db2
Exists in
master
and in
4 other branches
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>
Showing 1 changed file with 12 additions and 3 deletions Side-by-side Diff
scripts/get_maintainer.pl
... | ... | @@ -443,11 +443,21 @@ |
443 | 443 | my @lines = (); |
444 | 444 | |
445 | 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; | |
447 | 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; | |
454 | + } | |
448 | 455 | |
449 | 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 | 461 | $cmd .= " | cut -f2- -d\":\""; |
452 | 462 | $cmd .= " | sort | uniq -c | sort -rn"; |
453 | 463 | |
... | ... | @@ -486,7 +496,6 @@ |
486 | 496 | push(@email_to, $line); |
487 | 497 | } |
488 | 498 | } |
489 | - return $output; | |
490 | 499 | } |
491 | 500 | |
492 | 501 | sub uniq { |