X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Porting%2FMaintainers.pm;h=0b03e0579e50801800be577b201cd0ee556ad8d1;hb=17c79f43379fc059c3c23c26a109c793268b3956;hp=e457efc7ee80e3fc78689864b064f661fd1f433d;hpb=c5654d5b66b28416dd42561adb54cb0e1ca1cefd;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Porting/Maintainers.pm b/Porting/Maintainers.pm index e457efc..0b03e05 100644 --- a/Porting/Maintainers.pm +++ b/Porting/Maintainers.pm @@ -71,7 +71,7 @@ sub get_maintainer_modules { sub usage { print <<__EOF__; -$0: Usage: $0 [[--maintainer M --module M --files]|[--check] file ...] +$0: Usage: $0 [[--maintainer M --module M --files]|[--check] [commit] | [file ...] --maintainer M list all maintainers matching M --module M list all modules matching M --files list all files @@ -110,6 +110,11 @@ sub process_options { if ($Opened) { chomp (@Files = `git ls-files -m --full-name`); die if $?; + } elsif (@ARGV == 1 && + $ARGV[0] =~ /^(?:HEAD|[0-9a-f]{4,40})(?:~\d+)?\^*$/) { + my $command = "git diff --name-only $ARGV[0]^ $ARGV[0]"; + chomp (@Files = `$command`); + die "'$command' failed: $?" if $?; } else { @Files = @ARGV; } @@ -248,7 +253,7 @@ sub show_results { } } elsif ($Opened) { - print "(No files are modified)\n"; + print STDERR "(No files are modified)\n"; } else { usage();