chiark / gitweb /
Split brain: Move GIT_COMMITTER_* setting to quiltify_splitbrain toplevel (nfc)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 4 Jun 2016 15:48:43 +0000 (16:48 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jul 2016 15:47:47 +0000 (16:47 +0100)
We want this to apply to any commits we use git to make, not just
gbp-pq.

dgit

diff --git a/dgit b/dgit
index 4edf982..73432bc 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -2559,15 +2559,16 @@ sub quiltify_splitbrain ($$) {
        $diffbits = { %$diffbits };
        $_ = !!$_ foreach values %$diffbits;
     }
+    # We would like any commits we generate to be reproducible
+    my @authline = clogp_authline($clogp);
+    local $ENV{GIT_COMMITTER_NAME} =  $authline[0];
+    local $ENV{GIT_COMMITTER_EMAIL} = $authline[1];
+    local $ENV{GIT_COMMITTER_DATE} =  $authline[2];
     if ($quilt_mode =~ m/gbp|unapplied/ &&
        ($diffbits->{O2A} & 01) && # some patches
        !($diffbits->{H2O} & 01)) { # but HEAD is like orig
        quiltify_splitbrain_needed();
        progress "creating patches-applied version using gbp-pq";
-       my @authline = clogp_authline($clogp);
-       local $ENV{GIT_COMMITTER_NAME} =  $authline[0];
-       local $ENV{GIT_COMMITTER_EMAIL} = $authline[1];
-       local $ENV{GIT_COMMITTER_DATE} =  $authline[2];
        open STDOUT, ">/dev/null" or die $!;
        runcmd shell_cmd 'exec >/dev/null', @gbppq, qw(import);
     }