X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=git-debrebase;h=f55ef4eb59721e1596922b918f637897345d4f2d;hb=3edf6f20e21644cf727fe79d4da47a8492653775;hp=ee98f09f9b121a5affb978c83314c4255a8859c0;hpb=6e88f791b68d7ee8ddb97433aae6649d7b61d14d;p=dgit.git diff --git a/git-debrebase b/git-debrebase index ee98f09f..f55ef4eb 100755 --- a/git-debrebase +++ b/git-debrebase @@ -305,7 +305,7 @@ sub classify ($) { push @p, { Ix => $#p, CommitId => $ph, - Differs => (get_differs $t, $ph), + Differs => (get_differs $ph, $t), }; } @@ -475,7 +475,9 @@ sub walk ($;$$) { if ($nogenerate) { return (undef,undef); } - die "commit $cur: Cannot cope with this commit"; + die "commit $cur: Cannot cope with this commit (d.". + (join ' ', map { sprintf "%#x", $_->{Differs} } + @{ $cl->{Parents} }). ")"; }; my $build; @@ -513,7 +515,7 @@ sub walk ($;$$) { } elsif ($ty eq 'Mixed') { my $queue = sub { my ($q, $wh) = @_; - my $cls = { $cl, $xmsg->("split mixed commit: $wh part") }; + my $cls = { %$cl, $xmsg->("split mixed commit: $wh part") }; push @$q, $cls; }; $queue->(\@brw_cl, "debian"); @@ -663,7 +665,7 @@ sub walk ($;$$) { $ch =~ s{^tree .*}{tree $newtree}m or confess "$ch ?"; $ch =~ s{^parent .*\n}{}m; $ch =~ s{(?=^author)}{ - map { "parent $_\n" } @parents + join '', map { "parent $_\n" } @parents }me or confess "$ch ?"; if ($rewriting) { $ch =~ s{^committer .*$}{$committer_authline}m @@ -682,7 +684,9 @@ sub walk ($;$$) { } }; - runcmd @git, qw(diff-tree --quiet), $input, $build; + my $final_check = get_differs $build, $input; + die sprintf "internal error %#x", $final_check + if $final_check & ~D_PAT_ADD; return ($build, $breakwater); }