summaryrefslogtreecommitdiff
path: root/Porting/bisect.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Porting/bisect.pl')
-rwxr-xr-xPorting/bisect.pl25
1 files changed, 9 insertions, 16 deletions
diff --git a/Porting/bisect.pl b/Porting/bisect.pl
index 611e34adef..f3ae566296 100755
--- a/Porting/bisect.pl
+++ b/Porting/bisect.pl
@@ -7,16 +7,16 @@ my $start_time = time;
# Which isn't what we want.
use Getopt::Long qw(:config pass_through no_auto_abbrev);
-sub usage {
- die "$0: [--start revlike] [--end revlike] [--target=...] [-j4] [--expect-pass=0|1] thing to test";
-}
-
my ($start, $end);
-unless(GetOptions('start=s' => \$start,
- 'end=s' => \$end,
- )) {
- usage();
-}
+unshift @ARGV, '--help' unless GetOptions('start=s' => \$start,
+ 'end=s' => \$end);
+
+my $runner = $0;
+$runner =~ s/bisect\.pl/bisect-runner.pl/;
+
+die "Can't find bisect runner $runner" unless -f $runner;
+
+system $^X, $runner, '--check-args', @ARGV and exit 255;
# We try these in this order for the start revision if none is specified.
my @stable = qw(perl-5.002 perl-5.003 perl-5.004 perl-5.005 perl-5.6.0
@@ -35,13 +35,6 @@ die "This checkout is not clean - $modified modified or untracked file(s)"
system "git bisect reset" and die;
-my $runner = $0;
-$runner =~ s/bisect\.pl/bisect-runner.pl/;
-
-die "Can't find bisect runner $runner" unless -f $runner;
-
-system $^X, $runner, '--check-args', @ARGV and exit 255;
-
# Sanity check the first and last revisions:
if (defined $start) {
system "git checkout $start" and die;