diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-03-20 16:32:37 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-03-20 16:32:37 -0400 |
commit | a2c0423e541006f5d1c0c99f4bb07aadfb0cc733 (patch) | |
tree | c24c358ec1244fbf89a7a7fee28092a8a719aae5 /IkiWiki | |
parent | 2c86616a6a10397e47017cbccf0cbfd7992a497b (diff) |
fix rcs_getctime to return first, not last, change time
This was being buggy and returning the file's last change time, not its
creation time.
(I checked all the others (except tla) and they're ok.)
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/git.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index b386ab71b..68b114a73 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -594,8 +594,8 @@ sub rcs_getctime ($) { # Remove srcdir prefix $file =~ s/^\Q$config{srcdir}\E\/?//; - my $sha1 = git_sha1($file); - my $ci = git_commit_info($sha1, 1); + my @sha1s = run_or_non('git', 'rev-list', 'HEAD', '--', $file); + my $ci = git_commit_info($sha1s[$#sha1s], 1); my $ctime = $ci->{'author_epoch'}; debug("ctime for '$file': ". localtime($ctime)); |