summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJames E. Blair <jim@acmegating.com>2022-10-11 16:34:29 -0700
committerJames E. Blair <jim@acmegating.com>2022-10-13 10:31:19 -0700
commite2a472bc9708c8f7b222b43a75540d64bef77d82 (patch)
treeb29ef2ba1cc7af429e68365cb126473389d2c046 /doc
parent4bda3e1969313d7046e54a4fbcb347217121aeeb (diff)
downloadzuul-e2a472bc9708c8f7b222b43a75540d64bef77d82.tar.gz
Change merge mode default based on driver
The default merge mode is 'merge-resolve' because it has been observed that it more closely matches the behavior of jgit in Gerrit (or, at least it did the last time we looked into this). The other drivers are unlikely to use jgit and more likely to use the default git merge strategy. This change allows the default to differ based on the driver, and changes the default for all non-gerrit drivers to 'merge'. The implementation anticipates that we may want to add more granularity in the future, so the API accepts a project as an argument, and in the future, drivers could provide a per-project default (which they may obtain from the remote code review system). That is not implemented yet. This adds some extra data to the /projects endpoint in the REST api. It is currently not easy (and perhaps not possible) to determine what a project's merge mode is through the api. This change adds a metadata field to the output which will show the resulting value computed from all of the project stanzas. The project stanzas themselves may have null values for the merge modes now, so the web app now protects against that. Change-Id: I9ddb79988ca08aba4662cd82124bd91e49fd053c
Diffstat (limited to 'doc')
-rw-r--r--doc/source/config/project.rst18
1 files changed, 11 insertions, 7 deletions
diff --git a/doc/source/config/project.rst b/doc/source/config/project.rst
index 1aa570f41..af3faa943 100644
--- a/doc/source/config/project.rst
+++ b/doc/source/config/project.rst
@@ -105,12 +105,16 @@ pipeline.
not appear in a :ref:`project-template` definition.
.. attr:: merge-mode
- :default: merge-resolve
+ :default: (driver specific)
The merge mode which is used by Git for this project. Be sure
this matches what the remote system which performs merges (i.e.,
- Gerrit). The requested merge mode will be used by the Github driver
- when performing merges.
+ Gerrit). The requested merge mode will also be used by the
+ GitHub and GitLab drivers when performing merges.
+
+ The default is :value:`project.merge-mode.merge` for all drivers
+ except Gerrit, where the default is
+ :value:`project.merge-mode.merge-resolve`.
Each project may only have one ``merge-mode`` therefore Zuul
will use the first value that it encounters for a given project
@@ -122,24 +126,24 @@ pipeline.
.. value:: merge
Uses the default git merge strategy (recursive). This maps to
- the merge mode ``merge`` in Github and Gitlab.
+ the merge mode ``merge`` in GitHub and GitLab.
.. value:: merge-resolve
Uses the resolve git merge strategy. This is a very
conservative merge strategy which most closely matches the
behavior of Gerrit. This maps to the merge mode ``merge`` in
- Github and Gitlab.
+ GitHub and GitLab.
.. value:: cherry-pick
Cherry-picks each change onto the branch rather than
- performing any merges. This is not supported by Github and Gitlab.
+ performing any merges. This is not supported by Github and GitLab.
.. value:: squash-merge
Squash merges each change onto the branch. This maps to the
- merge mode ``squash`` in Github and Gitlab.
+ merge mode ``squash`` in GitHub and GitLab.
.. attr:: vars
:default: None