From ba42f0850a5c10737136f67cf974bb9d2957530c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 4 Jun 2016 16:45:06 +0100 Subject: Split brain: Further improvements to split brain patch application * Direct gbp-pq's stdout to /dev/null * Specify GIT_COMMITER_* so that the results are reproducible * Detect .gitignore problem --- dgit | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'dgit') diff --git a/dgit b/dgit index 29cf507..4edf982 100755 --- a/dgit +++ b/dgit @@ -2563,12 +2563,23 @@ sub quiltify_splitbrain ($$) { ($diffbits->{O2A} & 01) && # some patches !($diffbits->{H2O} & 01)) { # but HEAD is like orig quiltify_splitbrain_needed(); - runcmd @gbppq, qw(import); - die "SPLIT BRAIN"; - } + 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); + } + if (($diffbits->{H2O} & 02) && # user has modified .gitignore + !($diffbits->{O2A} & 02)) { # patches do not change .gitignore + quiltify_splitbrain_needed(); + progress "creating patch to represent .gitignore changes"; die 'xxx gitignore'; + + } die 'xxx memoisation via git-reflog'; - die 'xxx fast forward'; + die 'xxx fast forward (should not depend on quilt mode, but will always be needed if we did $split_brain)'; } sub quiltify ($$$$) { -- cgit v1.2.3