X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Porting%2Fgit-find-p4-change;h=6363ae29ada08cfab0937b0a43e833cd44eadc56;hb=906bad61c3bd0dd3a56a226b2981e4d14d5e71c9;hp=55bcbb8b99752fd08498bf1792008d9e6812b938;hpb=8ff80fc4c8e0f0cb22397f72417eafe1cf3e2c64;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Porting/git-find-p4-change b/Porting/git-find-p4-change index 55bcbb8..6363ae2 100755 --- a/Porting/git-find-p4-change +++ b/Porting/git-find-p4-change @@ -8,6 +8,8 @@ die "usage: $0 [-c|--checkout] [git-log-options] changenum" unless @ARGV; 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)); @@ -19,16 +21,16 @@ my $grep = "--grep=^p4raw-id:.*\@$change\$"; @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); } }