can't use --reverse with git log --follow

Meh, git.
master
Joey Hess 2009-10-11 23:07:31 -04:00
parent 85af97c9a2
commit bf577d34c7
1 changed files with 6 additions and 3 deletions

View File

@ -613,11 +613,14 @@ sub rcs_getctime ($) {
# Remove srcdir prefix
$file =~ s/^\Q$config{srcdir}\E\/?//;
my @raw_lines = run_or_die('git', 'log', '--reverse', '--follow',
my @raw_lines = run_or_die('git', 'log', '--follow',
'--pretty=raw', '--raw', '--abbrev=40', '--always', '-c',
'-r', '--', $file);
my $first = parse_diff_tree("", \@raw_lines);
my $ctime = $first->{'author_epoch'};
my @ci;
while (my $parsed = parse_diff_tree("", \@raw_lines)) {
push @ci, $parsed;
}
my $ctime = $ci[$#ci]->{'author_epoch'};
debug("ctime for '$file': ". localtime($ctime));
return $ctime;