git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michael McClimon <michael@mcclimon.org>
Cc: git@vger.kernel.org
Subject: Re: Potential bug with octopus merges and symlinks
Date: Mon, 06 Dec 2021 10:13:34 -0800	[thread overview]
Message-ID: <xmqqa6hdha9d.fsf@gitster.g> (raw)
In-Reply-To: <20211202030458.GA48278@newk> (Michael McClimon's message of "Wed, 1 Dec 2021 22:04:58 -0500")

Michael McClimon <michael@mcclimon.org> writes:

> The order here matters! Here is every permutation (1 here is the symlink
> change) to git merge; only the first two fail, all the others work.

I am not an active Octopus contributor, but was the original
inventor.  And it is not surprising that the order matters, because
I designed it that way ;-)

In the original design, octopus was to be used only to create the
simplest forms of merges without any conflicts, because octopus
merges make it almost impossible to examine the result of the merge
with comparison between one of the parent and the result (you have
to remember that there was no "diff --cc" invented yet, let alone
"diff --remerge-diff", back then to help us).  Aborting the merge at
the first conflict when merging the remote heads one by one is a way
to make sure that the result is a simple "combine unrelated work
into one" merge.  This does make the order matter somewhat.  When
more than one remote heads touch the same path, the order in which
they are merged into base does make a difference.

To be more strict for the goal of limiting octopus to the simplest
forms of merges without any conflicts, we should have insisted that
the set of paths these remote heads want to modify should not
overlap and that would have made the order totally not to matter,
but "abort at the first conflict" was easier to implement and
practical.

And later, before the command got part of the git suite, the rule
was further loosened to allow a conflicting merge when merging the
last remote head and let the user hand-resolve.  This makes the
order matter even more.


      parent reply	other threads:[~2021-12-06 18:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02  3:04 Potential bug with octopus merges and symlinks Michael McClimon
2021-12-04 17:34 ` Elijah Newren
2021-12-06 16:53 ` Martin von Zweigbergk
2021-12-06 18:13 ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqa6hdha9d.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=michael@mcclimon.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).