4 # Sets mtime and atime of files to the latest commit time in git.
6 # This is useful after the first clone of the rsync repository BEFORE you
7 # do any building. It is also safe if you have done a "make distclean".
13 open FH
, 'git ls-files -z|' or die $!;
21 open FH
, "git log -r --name-only --no-color --pretty=raw -z @ARGV |" or die $!;
24 if (/^committer .*? (\d+) (?:[\-\+]\d+)$/) {
26 } elsif (s/\0\0commit [a-f0-9]{40}$// or s/\0$//) {
27 my @files = delete @ls{split(/\0/, $_)};
28 @files = grep { defined $_ } @files;
30 utime $commit_time, $commit_time, @files;