chiark / gitweb /
git-debrebase: break out update_head_postlaunder (nfc)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 31 Jan 2018 15:31:02 +0000 (15:31 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jun 2018 11:25:49 +0000 (12:25 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
git-debrebase

index 931a0124bf367e678f39da4ef26cc2571e10efdc..c89e598f599a713a9903d7dedd159d840426b7d7 100755 (executable)
@@ -785,13 +785,18 @@ sub update_head_checkout ($$$) {
     update_head $old, $new, $mrest;
 }
 
+sub update_head_postlaunder ($$$) {
+    my ($old, $tip, $reflogmsg) = @_;
+    update_head $old, $tip, $reflogmsg;
+    # no tree changes except debian/patches
+    runcmd @git, qw(rm --quiet --ignore-unmatch -rf debian/patches);
+}
+
 sub cmd_launder () {
     badusage "no arguments to launder allowed" if @ARGV;
     my $old = get_head();
     my ($tip,$breakwater,$last_upstream_merge) = walk $old;
-    update_head $old, $tip, 'launder';
-    # no tree changes except debian/patches
-    runcmd @git, qw(rm --quiet --ignore-unmatch -rf debian/patches);
+    update_head_postlaunder $old, $tip, 'launder';
     printf "# breakwater tip\n%s\n", $breakwater;
     printf "# working tip\n%s\n", $tip;
     printf "# last upstream merge\n%s\n", $last_upstream_merge;