X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/d52607ecd6c8b4e68ebacff8cd5163257f59cfc2..9217ce30e308db28dc4789ef009ecf553f35097c:/support/git-set-file-times diff --git a/support/git-set-file-times b/support/git-set-file-times index 9ddef25f..85d854e8 100755 --- a/support/git-set-file-times +++ b/support/git-set-file-times @@ -8,6 +8,7 @@ use strict; my %ls; my $commit_time; +my $prefix = @ARGV && $ARGV[0] =~ s/^--prefix=// ? shift : ''; $/ = "\0"; open FH, 'git ls-files -z|' or die $!; @@ -27,6 +28,7 @@ while () { my @files = delete @ls{split(/\0/, $_)}; @files = grep { defined $_ } @files; next unless @files; + map { s/^/$prefix/ } @files; utime $commit_time, $commit_time, @files; } last unless %ls;