chiark / gitweb /
git-debrebase: keycommits: Move up $cl (nfc)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jun 2018 15:44:36 +0000 (16:44 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jun 2018 21:40:14 +0000 (22:40 +0100)
We are going to want this within the scope of the anon sub $x.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
git-debrebase

index fbf2a58a7188b49203ee78197b0ad406b1ced34a..cb0276be1e9778c36d17a0955ecd1e3d0f98ed2b 100755 (executable)
@@ -561,6 +561,7 @@ sub keycommits ($;$$$) {
 
     my ($anchor, $breakwater);
     my $clogonly;
+    my $cl;
     my $x = sub {
        my ($cb, $tagsfx, $why) = @_;
        my $m = "branch needs laundering (run git-debrebase): $why";
@@ -569,7 +570,7 @@ sub keycommits ($;$$$) {
        $cb->("unclean-$tagsfx", $why);
     };
     for (;;) {
-       my $cl = classify $head;
+       $cl = classify $head;
        my $ty = $cl->{Type};
        if ($ty eq 'Packaging') {
            $breakwater //= $clogonly;