summaryrefslogtreecommitdiff
path: root/git-debrebase
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-01-31 15:31:02 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-06-16 12:25:49 +0100
commitc7244a622fedfc203a935692a6f9e54733494dfc (patch)
tree558e0c6e2c218b20c1cf8974f90ec67b126eaf6b /git-debrebase
parent9aee0c0b6c45810895cf7349059c4178eabc4e19 (diff)
git-debrebase: break out update_head_postlaunder (nfc)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'git-debrebase')
-rwxr-xr-xgit-debrebase11
1 files changed, 8 insertions, 3 deletions
diff --git a/git-debrebase b/git-debrebase
index 931a012..c89e598 100755
--- a/git-debrebase
+++ b/git-debrebase
@@ -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;