# Remove srcdir prefix
$file =~ s/^\Q$config{srcdir}\E\/?//;
- my @sha1s = run_or_non('git', 'rev-list', 'HEAD', '--', $file);
- my $ci = git_commit_info($sha1s[$#sha1s], 1);
- my $ctime = $ci->{'author_epoch'};
+ my @raw_lines = run_or_die('git', 'log', '--reverse', '--follow',
+ '--pretty=raw', '--raw', '--abbrev=40', '--always', '-c',
+ '-r', '--', $file);
+ my $first = parse_diff_tree("", \@raw_lines);
+ my $ctime = $first->{'author_epoch'};
debug("ctime for '$file': ". localtime($ctime));
return $ctime;
* ikiwiki-calendar: New command automates creation of archive pages
using the calendar plugin.
+ * git: --getctime will now follow renames back to the original creation
+ of a file.
-- Joey Hess <joeyh@debian.org> Sun, 11 Oct 2009 15:54:45 -0400