From: Ian Jackson Date: Sun, 19 Aug 2018 21:27:56 +0000 (+0100) Subject: git-debrebase: Break out record_gdrlast X-Git-Tag: archive/debian/6.7~21 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=397f40c5e2d471582a688474df4aa1c9ed0f7a54 git-debrebase: Break out record_gdrlast NFC Signed-off-by: Ian Jackson --- diff --git a/git-debrebase b/git-debrebase index 165dc66a..8e347f15 100755 --- a/git-debrebase +++ b/git-debrebase @@ -428,6 +428,11 @@ sub any_snags () { return $snags_forced || $snags_tripped; } +sub record_gdrlast ($$) { + my ($gdrlast, $newvalue) = @_; + push @deferred_updates, "update $gdrlast $newvalue $git_null_obj"; +} + sub gbp_pq_export ($$$) { my ($bname, $base, $tip) = @_; # must be run in a workarea. $bname and patch-queue/$bname @@ -1881,8 +1886,7 @@ sub stitch ($$$$$) { # ffq-prev is ahead of us, and the only tree changes it has # are possibly addition of things in debian/patches/. # Just wind forwards rather than making a pointless pseudomerge. - push @deferred_updates, - "update $gdrlast $ffq_prev_commitish $git_null_obj"; + record_gdrlast $gdrlast, $ffq_prev_commitish; update_head_checkout $old_head, $ffq_prev_commitish, "stitch (fast forward)"; return; @@ -1895,7 +1899,7 @@ sub stitch ($$$$$) { 'Declare fast forward / record previous work', "[git-debrebase pseudomerge: $prose]", ]; - push @deferred_updates, "update $gdrlast $new_head $git_null_obj"; + record_gdrlast $gdrlast, $new_head; update_head $old_head, $new_head, "stitch: $prose"; }