]> Sergey Matveev's repositories - public-inbox.git/commitdiff
scripts/import_gmane_spool: set git committer date
authorEric Wong <e@80x24.org>
Sun, 20 Apr 2014 20:40:55 +0000 (20:40 +0000)
committerEric Wong <e@80x24.org>
Sun, 20 Apr 2014 20:40:55 +0000 (20:40 +0000)
We normally want committer date to be different so we may
track delivery latencies (which do not differ much).
However, the rules for importing are much different and
tend to screw things up when using time ranges with git-rev-list.

scripts/import_gmane_spool

index d96c26c8f5c2f21353342bd5d752f1877ea8301a..e072b810d5c1275c2f3acec6fef0e10942ec4e76 100755 (executable)
@@ -41,6 +41,9 @@ foreach my $n (sort { $a <=> $b } grep(/\d+\z/, glob("*"))) {
                        $s->header_set("Original-Received");
                }
 
+               # this is needed for "git rev-list --since=..." to work
+               local $ENV{GIT_COMMITTER_DATE} = $s->header('Date');
+
                # triggers for the SA HEADER_SPAM rule
                foreach my $drop (qw(Approved)) { $s->header_set($drop) }