diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-10-11 22:39:31 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-10-11 22:39:31 -0400 |
commit | 85af97c9a2311bc6c2606e43aeaf83f7a30e0514 (patch) | |
tree | 1e03ef773c51e4a65486817e0539cf790bbd7424 | |
parent | e4c765c64fc31ab13c911b716e80b07b4d1a0037 (diff) | |
parent | 33f42db2ea0422551223c255d85d9f4e45ee404b (diff) |
Merge branch 'master' into dependency-types
Conflicts:
debian/changelog
-rw-r--r-- | IkiWiki/Plugin/git.pm | 8 | ||||
-rw-r--r-- | debian/changelog | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index ad58231e0..e10283f59 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -613,9 +613,11 @@ sub rcs_getctime ($) { # 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; diff --git a/debian/changelog b/debian/changelog index 5c47b2524..e9f09a8c6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -32,6 +32,8 @@ ikiwiki (3.2009XXXX) UNRELEASED; urgency=low month/year. * calendar: Fix bug in next/previous year/month links, which sometimes linked to an archive page from the wrong year, or were missing. + * git: --getctime will now follow renames back to the original creation + of a file. -- Joey Hess <joeyh@debian.org> Fri, 09 Oct 2009 19:53:50 -0400 |