diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-10-11 23:07:31 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-10-11 23:36:06 -0400 |
commit | bf577d34c79ebe48efdf06ed826f9109e196cc6d (patch) | |
tree | e4e835898463a2db5de3d7cd3d6d6fc3d7be5ab4 /IkiWiki/Plugin | |
parent | 85af97c9a2311bc6c2606e43aeaf83f7a30e0514 (diff) |
can't use --reverse with git log --follow
Meh, git.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/git.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index e10283f59..9ecda4ffb 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -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; |