aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-03-03 08:53:02 -0800
committerJunio C Hamano <gitster@pobox.com>2025-03-03 08:53:02 -0800
commit238c8d3984fc38d10a257c0972f142793ae5af96 (patch)
treedc6c740861a3766e2a937701f6630b3efe4e552f
parentab09eddf601501290b5c719574fbe6c02314631f (diff)
parent4ebba56419f0a7530ae8378284d7ee0cec22ebfa (diff)
downloadgit-238c8d3984fc38d10a257c0972f142793ae5af96.tar.gz
Merge branch 'lo/doc-merge-submodule-update'
What happens to submodules during merge has been documented in a bit more detail. * lo/doc-merge-submodule-update: merge-strategies.adoc: detail submodule merge
-rw-r--r--Documentation/merge-strategies.adoc10
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/merge-strategies.adoc b/Documentation/merge-strategies.adoc
index a5dc95a378..93822ebc4e 100644
--- a/Documentation/merge-strategies.adoc
+++ b/Documentation/merge-strategies.adoc
@@ -22,6 +22,13 @@ ort::
was written as a replacement for the previous default
algorithm, `recursive`.
+
+In the case where the path is a submodule, if the submodule commit used on
+one side of the merge is a descendant of the submodule commit used on the
+other side of the merge, Git attempts to fast-forward to the
+descendant. Otherwise, Git will treat this case as a conflict, suggesting
+as a resolution a submodule commit that is descendant of the conflicting
+ones, if one exists.
++
The 'ort' strategy can take the following options:
ours;;
@@ -96,6 +103,9 @@ recursive::
the default strategy for resolving two heads from Git v0.99.9k
until v2.33.0.
+
+For a path that is a submodule, the same caution as 'ort' applies to this
+strategy.
++
The 'recursive' strategy takes the same options as 'ort'. However,
there are three additional options that 'ort' ignores (not documented
above) that are potentially useful with the 'recursive' strategy: