]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/git-rev-list_requires_relative_path___40__fixes_git_ctime__41__.mdwn
both are now fixed in my po branch.
[ikiwiki.git] / doc / todo / git-rev-list_requires_relative_path___40__fixes_git_ctime__41__.mdwn
1         Index: IkiWiki/Rcs/git.pm
2         ===================================================================
3         --- IkiWiki/Rcs/git.pm  (revision 4532)
4         +++ IkiWiki/Rcs/git.pm  (working copy)
5         @@ -275,6 +275,9 @@
6          
7                 my $file = shift || q{--};
8          
9         +       # Remove srcdir prefix to appease git-rev-list
10         +       $file =~ s/^$config{srcdir}\/?//;
11         +
12                 # Ignore error since a non-existing file might be given.
13                 my ($sha1) = run_or_non('git-rev-list', '--max-count=1', 'HEAD', $file);
14                 if ($sha1) {
15
16 I actually see a bug in this patch. :-) If srcdir = "foo" and the wiki
17 contains a "foo/bar" and a "bar", this will make it, in the non-ctime case,
18 get the sha1 of the wrong file, "bar", when "foo/bar" is asked for.
19
20 Better to strip the path out in getctime, I guess.
21
22 --[[Joey]]
23
24 [[!tag patch done]]