Reimplement the smudge filter in perl, faster

This commit is contained in:
Laurent Rineau 2012-11-26 16:56:52 +01:00
parent a615cb2d4c
commit cd03d5eaf2
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
#! /usr/bin/env perl
use Git;
#print STDERR "$ARGV[0]\n";
my $repo = Git->repository();
$last_date=$repo->command_oneline("log", "--pretty=format:\"%ad\"", "-1", "--", $ARGV[0]);
while(<STDIN>) {
s/\$Date[^\$]*\$/\$Date: $last_date\$/;
print;
}