summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-debrebase9
1 files changed, 9 insertions, 0 deletions
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");