chiark / gitweb /
git-debrebase: keycommits: Callbacks get separate $mainwhy
[dgit.git] / git-debrebase
index 04befff5484477c888825954b20ae53c760ce983..292471de90c33fc2e359a717d5a5ab5907eb56dd 100755 (executable)
@@ -568,11 +568,12 @@ sub keycommits ($;$$$$) {
     my $cl;
     $fatal //= sub { fail $_[2]; };
     my $x = sub {
     my $cl;
     $fatal //= sub { fail $_[2]; };
     my $x = sub {
-       my ($cb, $tagsfx, $why) = @_;
+       my ($cb, $tagsfx, $mainwhy, $xwhy) = @_;
+       my $why = $mainwhy.$xwhy;
        my $m = "branch needs laundering (run git-debrebase): $why";
        fail $m unless defined $cb;
        return unless $cb;
        my $m = "branch needs laundering (run git-debrebase): $why";
        fail $m unless defined $cb;
        return unless $cb;
-       $cb->("unclean-$tagsfx", $why, $cl);
+       $cb->("unclean-$tagsfx", $why, $cl, $mainwhy);
     };
     for (;;) {
        $cl = classify $head;
     };
     for (;;) {
        $cl = classify $head;
@@ -593,27 +594,27 @@ sub keycommits ($;$$$$) {
            last;
        } elsif ($ty eq 'Upstream') {
            $x->($unclean, 'ordering',
            last;
        } elsif ($ty eq 'Upstream') {
            $x->($unclean, 'ordering',
- "packaging change ($breakwater) follows upstream change (eg $head)")
+ "packaging change ($breakwater) follows upstream change"," (eg $head)")
                if defined $breakwater;
            $clogonly = undef;
            $breakwater = undef;
        } elsif ($ty eq 'Mixed') {
            $x->($unclean, 'mixed',
                if defined $breakwater;
            $clogonly = undef;
            $breakwater = undef;
        } elsif ($ty eq 'Mixed') {
            $x->($unclean, 'mixed',
-                "found mixed upstream/packaging commit ($head)");
+                "found mixed upstream/packaging commit"," ($head)");
            $clogonly = undef;
            $breakwater = undef;
        } elsif ($ty eq 'Pseudomerge' or
                 $ty eq 'AddPatches') {
            $x->($furniture, (lc $ty),
            $clogonly = undef;
            $breakwater = undef;
        } elsif ($ty eq 'Pseudomerge' or
                 $ty eq 'AddPatches') {
            $x->($furniture, (lc $ty),
-                "found interchange bureaucracy commit ($ty$head)");
+                "found interchange bureaucracy commit ($ty)"," ($head)");
        } elsif ($ty eq 'DgitImportUnpatched') {
            $x->($trouble, 'dgitimport',
                 "found dgit dsc import ($head)");
            return (undef,undef);
        } else {
            $x->($fatal, 'unprocessable',
        } elsif ($ty eq 'DgitImportUnpatched') {
            $x->($trouble, 'dgitimport',
                 "found dgit dsc import ($head)");
            return (undef,undef);
        } else {
            $x->($fatal, 'unprocessable',
-                "found unprocessable commit, cannot cope: $head; $cl->{Why}"
-               );
+                "found unprocessable commit, cannot cope: $cl->{Why}",
+                " ($head)");
            return (undef,undef);
        }
        $head = $cl->{Parents}[0]{CommitId};
            return (undef,undef);
        }
        $head = $cl->{Parents}[0]{CommitId};