From: Junio C Hamano <gitster@pobox.com>
To: Pavel Rappo <pavel.rappo@gmail.com>
Cc: Git mailing list <git@vger.kernel.org>
Subject: Re: Determining if a merge was produced automatically
Date: Mon, 01 Jul 2024 11:16:51 -0700 [thread overview]
Message-ID: <xmqqbk3hx9ik.fsf@gitster.g> (raw)
In-Reply-To: <CAChcVu=bWR_DvR==b7L0tn8PmK+9KOWWw+e7RtjMhywMv3W+qA@mail.gmail.com> (Pavel Rappo's message of "Mon, 1 Jul 2024 17:08:13 +0100")
Pavel Rappo <pavel.rappo@gmail.com> writes:
> it for such merge commits produced automatically because of the
> assumption that nothing bad can happen there.
I do not think that assumption holds in the first place, though. A
typical and often cited example is when one side changed a helper
function's behaviour while the other side added new callers to the
helper function, still assuming the original behaviour. In such a
case there may not even be an textual conflict but the end results
may be broken, and if the breakage is subtle, it may take weeks or
months before somebody notices such a semantic mismerge.
Your "review a conflicted-and-resolved merge on one integration
branch once, and skip the re-review as long as the resolution is the
same way as the original one when the same branch gets merged into
another integration branch" is a neat idea (and the integration
branches we have in our project are run more-or-less like that).
But there, you'd need more than "both are cleanly auto-merged"; more
like "both may have conflicted but they are resolved the same way"
is what you are interested, no? Since at that point, your primary
interest shouldn't be "does it cleanly auto-merge?" but "do these
two merges do the same thing?", determining if a merge was created
automatically becomes a problem you do not need to solve, or solving
it would not further your true goal.
If you have two integration branches A and B, and a topic branch T
first gets merged to A and then after proving its worth it gets
merged down to B, I wonder if you can verify somebody's merge of B
into T by comparing the result with your "verification merge", which
you preform locally and on a throw-away branch by using "git rebase
--rebase-merges" or some mechanism, to replay the original merge of
T into A on top of B (before the merge of T you are verifying).
next prev parent reply other threads:[~2024-07-01 18:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-30 18:06 Determining if a merge was produced automatically Pavel Rappo
[not found] ` <CANiSa6hVbrCpPtBCL_W8+43uWGL0LFJkFhSJYGtfFgxX75zE8w@mail.gmail.com>
2024-07-01 0:45 ` Martin von Zweigbergk
2024-07-01 15:11 ` Elijah Newren
2024-07-01 16:43 ` Pavel Rappo
2024-07-01 11:49 ` Jonathan Nieder
2024-07-01 13:13 ` Pavel Rappo
2024-07-01 15:43 ` Junio C Hamano
2024-07-01 15:39 ` Junio C Hamano
2024-07-01 16:08 ` Pavel Rappo
2024-07-01 18:16 ` Junio C Hamano [this message]
2024-07-01 22:26 ` Pavel Rappo
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqbk3hx9ik.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=pavel.rappo@gmail.com \
/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.
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 NNTP newsgroup(s).