From bcca6a6dfc34e624274055ed1dd3fc3371a539a4 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 22 Apr 2018 18:54:31 +0100 Subject: git-debrebase: comment: explain why tagged linear anchors are evil Signed-off-by: Ian Jackson --- git-debrebase | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/git-debrebase b/git-debrebase index fcca5b1..5246317 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"); -- cgit v1.2.3