chiark / gitweb /
quilt fixup: Break out quilt_fixup_mkwork (nfc)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 21 Aug 2015 12:08:02 +0000 (13:08 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 21 Aug 2015 12:08:02 +0000 (13:08 +0100)
dgit

diff --git a/dgit b/dgit
index e5edd551cefd9ee2859165bb97afbd6283b8ce36..4675944fc3c30a4400c0ea741f8f8b79fa9c9919 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -2765,6 +2765,15 @@ sub build_maybe_quilt_fixup () {
         @git, qw(pull --ff-only -q .git/dgit/unpack/work master);
 }
 
+sub quilt_fixup_mkwork ($) {
+    my ($headref) = @_;
+
+    mkdir "work" or die $!;
+    changedir "work";
+    mktree_in_ud_here();
+    runcmd @git, qw(reset --hard), $headref;
+}
+
 sub quilt_fixup_multipatch ($$$) {
     my ($clogp, $headref, $upstreamversion) = @_;
 
@@ -2859,10 +2868,7 @@ END
     my $fakexdir= $package.'-'.(stripepoch $upstreamversion);
     rename $fakexdir, "fake" or die "$fakexdir $!";
 
-    mkdir "work" or die $!;
-    changedir "work";
-    mktree_in_ud_here();
-    runcmd @git, qw(reset --hard), $headref;
+    quilt_fixup_mkwork($headref);
 
     my $mustdeletepc=0;
     if (stat_exists ".pc") {