X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=git-debrebase;h=524631787575bb459556a696c92850e040a8b970;hp=fcca5b1ad6b0cb4bb4ee893bf7b61b8216a79bbe;hb=bcca6a6dfc34e624274055ed1dd3fc3371a539a4;hpb=31c54246f7285b92c2649625422af08c4828d555 diff --git a/git-debrebase b/git-debrebase index fcca5b1a..52463178 100755 --- a/git-debrebase +++ b/git-debrebase @@ -396,6 +396,15 @@ sub classify ($) { # BreakwaterStart commits are also anchors in the terminology # of git-debrebase(5), but they are untagged (and always # manually generated). + # + # We cannot not tolerate any tagged linear commit (ie, + # BreakwaterStart commits tagged `[anchor:') because such a + # thing could result from an erroneous linearising raw git + # rebase of a merge anchor. That would represent a corruption + # of the branch. and we want to detect and reject the results + # of such corruption before it makes it out anywhere. If we + # reject it here then we avoid making the pseudomerge which + # would be needed to push it. my $badanchor = sub { $unknown->("git-debrebase \`anchor' but @_"); }; @p == 2 or return $badanchor->("has other than two parents");