fail f_ "rpush negotiated protocol version %s".
" which does not support quilt mode %s",
$protovsn, $quilt_mode
- if quiltmode_splitbrain;
+ if quiltmode_splitbrain && $protovsn < 4;
my @localpaths = i_method "i_want", $keyword;
printdebug "[[ $keyword @localpaths\n";
return $r;
}
-sub quiltify_splitbrain_needed () {
- if (!$split_brain) {
- progress __ "dgit view: changes are required...";
- runcmd @git, qw(checkout -q -b dgit-view);
- $split_brain = 1;
- }
-}
-
sub quiltify_splitbrain ($$$$$$$) {
my ($clogp, $unapplied, $headref, $oldtiptree, $diffbits,
$editedignores, $cachekey) = @_;
local $ENV{GIT_AUTHOR_EMAIL} = $authline[1];
local $ENV{GIT_AUTHOR_DATE} = $authline[2];
+ die if $split_brain;
+ runcmd @git, qw(checkout -q -b dgit-view);
+ $split_brain = 1;
+
my $fulldiffhint = sub {
my ($x,$y) = @_;
my $cmd = "git diff $x $y -- :/ ':!debian'";
}
if ($quilt_mode =~ m/gbp|unapplied/ &&
($diffbits->{O2A} & 01)) { # some patches
- quiltify_splitbrain_needed();
progress __ "dgit view: creating patches-applied version using gbp pq";
runcmd shell_cmd 'exec >/dev/null', gbp_pq, qw(import);
# gbp pq import creates a fresh branch; push back to dgit-view
}
if (($diffbits->{O2H} & 02) && # user has modified .gitignore
!($diffbits->{O2A} & 02)) { # patches do not change .gitignore
- quiltify_splitbrain_needed();
progress __
"dgit view: creating patch to represent .gitignore changes";
ensuredir "debian/patches";