summaryrefslogtreecommitdiff
path: root/git-debrebase
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-04-22 18:54:31 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-06-16 16:07:01 +0100
commitbcca6a6dfc34e624274055ed1dd3fc3371a539a4 (patch)
tree9921e12ae1b3f28240a51f5227e0062308b44378 /git-debrebase
parent31c54246f7285b92c2649625422af08c4828d555 (diff)
git-debrebase: comment: explain why tagged linear anchors are evil
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'git-debrebase')
-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");