From: Ian Jackson Date: Tue, 18 Jun 2019 19:28:15 +0000 (+0100) Subject: dgit: Do split brain cache and saving in build_maybe_quilt_fixup X-Git-Tag: archive/debian/9.0~112 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=9d8d3f33124550239ceda34e6b6dbf14a4db77ec;p=dgit.git dgit: Do split brain cache and saving in build_maybe_quilt_fixup This wants to happy whenever we have a split brain, not only in splitting multipatch modes. Signed-off-by: Ian Jackson --- diff --git a/dgit b/dgit index 60d7f1fb..6a035d6a 100755 --- a/dgit +++ b/dgit @@ -5525,16 +5525,6 @@ END [dgit ($our_version) update-gitignore-quilt-fixup] ENDU } - - my $dgitview = git_rev_parse 'HEAD'; - - changedir $maindir; - reflog_cache_insert "refs/$splitbraincache", $cachekey, $dgitview; - - changedir "$playground/work"; - - my $saved = maybe_split_brain_save $headref, $dgitview, __ "converted"; - progress f_ "dgit view: created (%s)", $saved; } sub quiltify ($$$$) { @@ -5867,6 +5857,19 @@ sub build_maybe_quilt_fixup () { $splitbrain_cachekey); } + if ($do_split_brain) { + my $dgitview = git_rev_parse 'HEAD'; + + changedir $maindir; + reflog_cache_insert "refs/$splitbraincache", + $splitbrain_cachekey, $dgitview; + + changedir "$playground/work"; + + my $saved = maybe_split_brain_save $headref, $dgitview, __ "converted"; + progress f_ "dgit view: created (%s)", $saved; + } + changedir $maindir; runcmd_ordryrun_local @git, qw(pull --ff-only -q), "$playground/work", qw(master);