From: Ian Jackson Date: Sun, 14 Aug 2016 17:37:59 +0000 (+0100) Subject: dgit: Use GIT_COMMITTER_DATE for automatic patch X-Git-Tag: archive/debian/2.0~238 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=ee802f8a6760c88b641f05d4dee51439a9a42c96;ds=sidebyside dgit: Use GIT_COMMITTER_DATE for automatic patch When automatically generating quilt patch, honour GIT_COMMITTER_DATE for filename creation (makes filename deterministic in test suite). --- diff --git a/debian/changelog b/debian/changelog index ce449c7e..ee5f7d0b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,8 @@ dgit (1.5~~) unstable; urgency=medium we rely on --rm-old-changes, or failing that, fail early. * When doing quilt linearisation, treat upstream .gitignores not in the toplevel the same way we treat ones in the toplevel. + * When automatically generating quilt patch, honour GIT_COMMITTER_DATE + for filename creation (makes filename deterministic in test suite). Infrastructure: * Better error handling in dgit-repos-policy-debian. diff --git a/dgit b/dgit index 352e5b16..bf0d6398 100755 --- a/dgit +++ b/dgit @@ -2880,7 +2880,8 @@ sub quiltify ($$$$) { die "$quilt_mode ?"; } - my $time = time; + my $time = $ENV{'GIT_COMMITTER_DATE'} || time; + $time =~ s/\s.*//; # trim timezone from GIT_COMMITTER_DATE my $ncommits = 3; my $msg = cmdoutput @git, qw(log), "-n$ncommits";