my $num = 1;
my $checkout = 0;
+my $before = '--before=2008-12-18'; # only changes made under perforce
+
for (@ARGV) {
m{^\d+$} && (($change,$_) = ($_,undef));
m{^-\d+$} && (($num,$_) = (-$_,undef));
@ARGV = grep { defined } @ARGV;
if ($checkout) {
- my $commit = qx(git rev-list -1 --all '$grep');
+ my $commit = qx(git rev-list -1 --all $before '$grep');
chomp $commit;
die "no commit found" unless $commit;
system(git => checkout => $commit);
}
else {
if ( -t STDOUT or @ARGV ) {
- system(qw(git log), $grep, "-$num", "--all", @ARGV);
+ system(qw(git log), $grep, "-$num", "--all", $before, @ARGV);
}
else {
- system(qw(git rev-list -1 --all), $grep);
+ system(qw(git rev-list -1 --all), $before, $grep);
}
}