chiark / gitweb /
git-debrebase: fixes
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 14 Jun 2017 23:20:02 +0000 (00:20 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jun 2018 11:25:49 +0000 (12:25 +0100)
git-debrebase

index 7b64bf5..4fb5e91 100755 (executable)
@@ -342,13 +342,6 @@ sub walk {
        push @brw_cl, $sp_cl;
        push @processed, $sp_cl;
     };
-    my $build_start = sub {
-       my ($msg, $parents) = @_;
-       $prline->(" $msg");
-       push @brw_cl, { ExactlyParents => $parents };
-       no qw(exiting); last;
-    };
-
     my $cur = $input;
 
     my $prdelim = "";
@@ -360,6 +353,13 @@ sub walk {
        $prdelim = "\n";
     };
 
+    my $build_start = sub {
+       my ($msg, $parents) = @_;
+       $prline->(" $msg");
+       push @brw_cl, { ExactlyParents => $parents };
+       no warnings qw(exiting); last;
+    };
+
     my $bomb = sub { # usage: return $bomb->();
        print $report " Unprocessable" if $report;
        $prprdelim->();
@@ -389,7 +389,7 @@ sub walk {
            $cur = $p0;
            next;
        } elsif ($ty eq 'BreakwaterStart') {
-           $build_start('FirstPackaging',[$cur]};
+           $build_start->('FirstPackaging',[$cur]);
        } elsif ($ty eq 'Upstream') {
            push @upp_cl, $cl;
            $cur = $p0;
@@ -464,7 +464,7 @@ sub walk {
                }
                $prline->(" Import");
                $rewrite_from_here->();
-               $upp_limit //= $#upp; # further, deeper, patches discarded
+               $upp_limit //= $#upp_cl; # further, deeper, patches discarded
                $cur = $ovwr;
                next;
            } else {