]> git.ipfire.org Git - thirdparty/git.git/commit
merge-strategies.adoc: detail submodule merge
authorLucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Tue, 25 Feb 2025 16:18:00 +0000 (13:18 -0300)
committerJunio C Hamano <gitster@pobox.com>
Wed, 26 Feb 2025 00:06:06 +0000 (16:06 -0800)
commit4ebba56419f0a7530ae8378284d7ee0cec22ebfa
tree47b533093cb54fdcc0d91c140d5895e989d6156a
parent55b5ba87f1ce7ef5c9f891392a7271bfc4d62d2b
merge-strategies.adoc: detail submodule merge

Submodule merges are, in general, similar to other merges based on oid
three-way-merge. When a conflict happens, however, Git has two special
cases (introduced in 68d03e4a6e44) on handling the conflict before
yielding it to the user. From the merge-ort and merge-recursive sources:

- "Case #1: a is contained in b or vice versa": both strategies try to
perform a fast-forward in the submodules if the commit referred by the
conflicted submodule is descendant of another;

- "Case #2: There are one or more merges that contain a and b in the
submodule.  If there is only one, then present it as a suggestion to the
user, but leave it marked unmerged so the user needs to confirm the
resolution."

Add a small paragraph on merge-strategies.adoc describing this behavior.

Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/merge-strategies.adoc