diff options
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 24 |
1 files changed, 16 insertions, 8 deletions
@@ -176,6 +176,7 @@ autoflush STDOUT 1; our $supplementary_message = ''; our $split_brain = 0; +our $do_split_brain = 0; END { local ($@, $?); @@ -5394,6 +5395,7 @@ sub quiltify_splitbrain ($$$$$$$) { local $ENV{GIT_AUTHOR_DATE} = $authline[2]; die if $split_brain; + die unless $do_split_brain; runcmd @git, qw(checkout -q -b dgit-view); $split_brain = 1; @@ -5783,12 +5785,7 @@ sub build_maybe_quilt_fixup () { check_for_vendor_patches(); - if (quiltmode_splitbrain) { - fail <<END unless access_cfg_tagformats_can_splitbrain; -quilt mode $quilt_mode requires split view so server needs to support - both "new" and "maint" tag formats, but config says it doesn't. -END - } + $do_split_brain = 1 if quiltmode_splitbrain(); my $clogp = parsechangelog(); my $headref = git_rev_parse('HEAD'); @@ -5839,6 +5836,17 @@ END @git, qw(pull --ff-only -q), "$playground/work", qw(master); } +sub build_check_quilt_splitbrain () { + build_maybe_quilt_fixup(); + + if ($do_split_brain) { + fail <<END unless access_cfg_tagformats_can_splitbrain; +quilt mode $quilt_mode requires split view so server needs to support + both "new" and "maint" tag formats, but config says it doesn't. +END + } +} + sub unpack_playtree_mkwork ($) { my ($headref) = @_; @@ -6393,7 +6401,7 @@ sub build_prep ($) { # said -wc we should still do the check. clean_tree_check(); } - build_maybe_quilt_fixup(); + build_check_quilt_splitbrain(); if ($rmchanges) { my $pat = changespat $version; foreach my $f (glob "$buildproductsdir/$pat") { @@ -6773,7 +6781,7 @@ sub cmd_push_source { "dgit push-source: --include-dirty/--ignore-dirty does not make". "sense with push-source!" if $includedirty; - build_maybe_quilt_fixup(); + build_check_quilt_splitbrain(); if ($changesfile) { my $changes = parsecontrol("$buildproductsdir/$changesfile", __ "source changes file"); |