Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Commit 6efc6ba

Browse files
authored
Merge branch 'violethaze74:master' into master
2 parents 437497e + 6c40894 commit 6efc6ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+619
-182
lines changed

.cirrus.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@ env:
22
CIRRUS_CLONE_DEPTH: 1
33

44
freebsd_12_task:
5+
env:
6+
GIT_PROVE_OPTS: "--timer --jobs 10"
7+
GIT_TEST_OPTS: "--no-chain-lint --no-bin-wrappers"
8+
MAKEFLAGS: "-j4"
9+
DEFAULT_TEST_TARGET: prove
10+
DEVELOPER: 1
511
freebsd_instance:
6-
image: freebsd-12-1-release-amd64
12+
image_family: freebsd-12-2
13+
memory: 2G
714
install_script:
815
pkg install -y gettext gmake perl5
916
create_user_script:

Documentation/RelNotes/2.34.0.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ UI, Workflows & Features
1010
location relative to Git installation (e.g. its $sharedir which is
1111
$(prefix)/share), with "%(prefix)".
1212

13+
* Use `ort` instead of `recursive` as the default merge strategy.
14+
15+
* The userdiff pattern for "java" language has been updated.
16+
1317

1418
Performance, Internal Implementation, Development Support etc.
1519

@@ -32,6 +36,14 @@ Performance, Internal Implementation, Development Support etc.
3236
"git fetch-pack" has been optimized by taking advantage of the
3337
commit graph when available.
3438

39+
* Remind developers that the userdiff patterns should be kept simple
40+
and permissive, assuming that the contents they apply are always
41+
syntactically correct.
42+
43+
* The current implementation of GIT_TEST_FAIL_PREREQS is broken in
44+
that checking for the lack of a prerequisite would not work. Avoid
45+
the use of "if ! test_have_prereq X" in a test script.
46+
3547

3648
Fixes since v2.33
3749
-----------------
@@ -44,5 +56,22 @@ Fixes since v2.33
4456
push" code path.
4557
(merge 82823118b9 jt/push-negotiation-fixes later to maint).
4658

59+
* "git pull" had various corner cases that were not well thought out
60+
around its --rebase backend, e.g. "git pull --ff-only" did not stop
61+
but went ahead and rebased when the history on other side is not a
62+
descendant of our history. The series tries to fix them up.
63+
(merge 6f843a3355 en/pull-conflicting-options later to maint).
64+
65+
* "git apply" miscounted the bytes and failed to read to the end of
66+
binary hunks.
67+
(merge 46d723ce57 jk/apply-binary-hunk-parsing-fix later to maint).
68+
69+
* "git range-diff" code clean-up.
70+
(merge c4d5907324 jk/range-diff-fixes later to maint).
71+
4772
* Other code cleanup, docfix, build fix, etc.
4873
(merge 1d9c8daef8 ab/bundle-doc later to maint).
74+
(merge 81483fe613 en/merge-strategy-docs later to maint).
75+
(merge 626beebdf8 js/log-protocol-version later to maint).
76+
(merge 00e302da76 cb/builtin-merge-format-string-fix later to maint).
77+
(merge ad51ae4dc0 cb/ci-freebsd-update later to maint).

Documentation/git-merge.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ merge has resulted in conflicts.
6161

6262
OPTIONS
6363
-------
64+
:git-merge: 1
65+
6466
include::merge-options.txt[]
6567

6668
-m <msg>::

Documentation/git-pull.txt

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@ SYNOPSIS
1515
DESCRIPTION
1616
-----------
1717

18-
Incorporates changes from a remote repository into the current
19-
branch. In its default mode, `git pull` is shorthand for
20-
`git fetch` followed by `git merge FETCH_HEAD`.
21-
22-
More precisely, 'git pull' runs 'git fetch' with the given
23-
parameters and calls 'git merge' to merge the retrieved branch
24-
heads into the current branch.
25-
With `--rebase`, it runs 'git rebase' instead of 'git merge'.
18+
Incorporates changes from a remote repository into the current branch.
19+
If the current branch is behind the remote, then by default it will
20+
fast-forward the current branch to match the remote. If the current
21+
branch and the remote have diverged, the user needs to specify how to
22+
reconcile the divergent branches with `--rebase` or `--no-rebase` (or
23+
the corresponding configuration option in `pull.rebase`).
24+
25+
More precisely, `git pull` runs `git fetch` with the given parameters
26+
and then depending on configuration options or command line flags,
27+
will call either `git rebase` or `git merge` to reconcile diverging
28+
branches.
2629

2730
<repository> should be the name of a remote repository as
2831
passed to linkgit:git-fetch[1]. <refspec> can name an
@@ -132,7 +135,7 @@ published that history already. Do *not* use this option
132135
unless you have read linkgit:git-rebase[1] carefully.
133136

134137
--no-rebase::
135-
Override earlier --rebase.
138+
This is shorthand for --rebase=false.
136139

137140
Options related to fetching
138141
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Documentation/git-rebase.txt

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,7 @@ See also INCOMPATIBLE OPTIONS below.
340340

341341
-m::
342342
--merge::
343-
Use merging strategies to rebase. When the recursive (default) merge
344-
strategy is used, this allows rebase to be aware of renames on the
345-
upstream side. This is the default.
343+
Using merging strategies to rebase (default).
346344
+
347345
Note that a rebase merge works by replaying each commit from the working
348346
branch on top of the <upstream> branch. Because of this, when a merge
@@ -354,9 +352,8 @@ See also INCOMPATIBLE OPTIONS below.
354352

355353
-s <strategy>::
356354
--strategy=<strategy>::
357-
Use the given merge strategy.
358-
If there is no `-s` option 'git merge-recursive' is used
359-
instead. This implies --merge.
355+
Use the given merge strategy, instead of the default `ort`.
356+
This implies `--merge`.
360357
+
361358
Because 'git rebase' replays each commit from the working branch
362359
on top of the <upstream> branch using the given strategy, using
@@ -369,7 +366,7 @@ See also INCOMPATIBLE OPTIONS below.
369366
--strategy-option=<strategy-option>::
370367
Pass the <strategy-option> through to the merge strategy.
371368
This implies `--merge` and, if no strategy has been
372-
specified, `-s recursive`. Note the reversal of 'ours' and
369+
specified, `-s ort`. Note the reversal of 'ours' and
373370
'theirs' as noted above for the `-m` option.
374371
+
375372
See also INCOMPATIBLE OPTIONS below.
@@ -530,7 +527,7 @@ The `--rebase-merges` mode is similar in spirit to the deprecated
530527
where commits can be reordered, inserted and dropped at will.
531528
+
532529
It is currently only possible to recreate the merge commits using the
533-
`recursive` merge strategy; Different merge strategies can be used only via
530+
`ort` merge strategy; different merge strategies can be used only via
534531
explicit `exec git merge -s <strategy> [...]` commands.
535532
+
536533
See also REBASING MERGES and INCOMPATIBLE OPTIONS below.
@@ -1219,12 +1216,16 @@ successful merge so that the user can edit the message.
12191216
If a `merge` command fails for any reason other than merge conflicts (i.e.
12201217
when the merge operation did not even start), it is rescheduled immediately.
12211218

1222-
At this time, the `merge` command will *always* use the `recursive`
1223-
merge strategy for regular merges, and `octopus` for octopus merges,
1224-
with no way to choose a different one. To work around
1225-
this, an `exec` command can be used to call `git merge` explicitly,
1226-
using the fact that the labels are worktree-local refs (the ref
1227-
`refs/rewritten/onto` would correspond to the label `onto`, for example).
1219+
By default, the `merge` command will use the `ort` merge strategy for
1220+
regular merges, and `octopus` for octopus merges. One can specify a
1221+
default strategy for all merges using the `--strategy` argument when
1222+
invoking rebase, or can override specific merges in the interactive
1223+
list of commands by using an `exec` command to call `git merge`
1224+
explicitly with a `--strategy` argument. Note that when calling `git
1225+
merge` explicitly like this, you can make use of the fact that the
1226+
labels are worktree-local refs (the ref `refs/rewritten/onto` would
1227+
correspond to the label `onto`, for example) in order to refer to the
1228+
branches you want to merge.
12281229

12291230
Note: the first command (`label onto`) labels the revision onto which
12301231
the commits are rebased; The name `onto` is just a convention, as a nod

Documentation/gitfaq.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ best to always use a regular merge commit.
275275

276276
[[merge-two-revert-one]]
277277
If I make a change on two branches but revert it on one, why does the merge of those branches include the change?::
278-
By default, when Git does a merge, it uses a strategy called the recursive
278+
By default, when Git does a merge, it uses a strategy called the `ort`
279279
strategy, which does a fancy three-way merge. In such a case, when Git
280280
performs the merge, it considers exactly three points: the two heads and a
281281
third point, called the _merge base_, which is usually the common ancestor of

Documentation/merge-options.txt

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
--no-commit::
33
Perform the merge and commit the result. This option can
44
be used to override --no-commit.
5+
ifdef::git-pull[]
6+
Only useful when merging.
7+
endif::git-pull[]
58
+
69
With --no-commit perform the merge and stop just before creating
710
a merge commit, to give the user a chance to inspect and further
@@ -39,6 +42,7 @@ set to `no` at the beginning of them.
3942
to `MERGE_MSG` before being passed on to the commit machinery in the
4043
case of a merge conflict.
4144

45+
ifdef::git-merge[]
4246
--ff::
4347
--no-ff::
4448
--ff-only::
@@ -47,6 +51,22 @@ set to `no` at the beginning of them.
4751
default unless merging an annotated (and possibly signed) tag
4852
that is not stored in its natural place in the `refs/tags/`
4953
hierarchy, in which case `--no-ff` is assumed.
54+
endif::git-merge[]
55+
ifdef::git-pull[]
56+
--ff-only::
57+
Only update to the new history if there is no divergent local
58+
history. This is the default when no method for reconciling
59+
divergent histories is provided (via the --rebase=* flags).
60+
61+
--ff::
62+
--no-ff::
63+
When merging rather than rebasing, specifies how a merge is
64+
handled when the merged-in history is already a descendant of
65+
the current history. If merging is requested, `--ff` is the
66+
default unless merging an annotated (and possibly signed) tag
67+
that is not stored in its natural place in the `refs/tags/`
68+
hierarchy, in which case `--no-ff` is assumed.
69+
endif::git-pull[]
5070
+
5171
With `--ff`, when possible resolve the merge as a fast-forward (only
5272
update the branch pointer to match the merged branch; do not create a
@@ -55,9 +75,11 @@ descendant of the current history), create a merge commit.
5575
+
5676
With `--no-ff`, create a merge commit in all cases, even when the merge
5777
could instead be resolved as a fast-forward.
78+
ifdef::git-merge[]
5879
+
5980
With `--ff-only`, resolve the merge as a fast-forward when possible.
6081
When not possible, refuse to merge and exit with a non-zero status.
82+
endif::git-merge[]
6183

6284
-S[<keyid>]::
6385
--gpg-sign[=<keyid>]::
@@ -73,6 +95,9 @@ When not possible, refuse to merge and exit with a non-zero status.
7395
In addition to branch names, populate the log message with
7496
one-line descriptions from at most <n> actual commits that are being
7597
merged. See also linkgit:git-fmt-merge-msg[1].
98+
ifdef::git-pull[]
99+
Only useful when merging.
100+
endif::git-pull[]
76101
+
77102
With --no-log do not list one-line descriptions from the
78103
actual commits being merged.
@@ -102,18 +127,25 @@ With --no-squash perform the merge and commit the result. This
102127
option can be used to override --squash.
103128
+
104129
With --squash, --commit is not allowed, and will fail.
130+
ifdef::git-pull[]
131+
+
132+
Only useful when merging.
133+
endif::git-pull[]
105134

106135
--no-verify::
107136
This option bypasses the pre-merge and commit-msg hooks.
108137
See also linkgit:githooks[5].
138+
ifdef::git-pull[]
139+
Only useful when merging.
140+
endif::git-pull[]
109141

110142
-s <strategy>::
111143
--strategy=<strategy>::
112144
Use the given merge strategy; can be supplied more than
113145
once to specify them in the order they should be tried.
114146
If there is no `-s` option, a built-in list of strategies
115-
is used instead ('git merge-recursive' when merging a single
116-
head, 'git merge-octopus' otherwise).
147+
is used instead (`ort` when merging a single head,
148+
`octopus` otherwise).
117149

118150
-X <option>::
119151
--strategy-option=<option>::
@@ -127,6 +159,10 @@ With --squash, --commit is not allowed, and will fail.
127159
default trust model, this means the signing key has been signed by
128160
a trusted key. If the tip commit of the side branch is not signed
129161
with a valid key, the merge is aborted.
162+
ifdef::git-pull[]
163+
+
164+
Only useful when merging.
165+
endif::git-pull[]
130166

131167
--summary::
132168
--no-summary::
@@ -167,3 +203,7 @@ endif::git-pull[]
167203
projects that started their lives independently. As that is
168204
a very rare occasion, no configuration variable to enable
169205
this by default exists and will not be added.
206+
ifdef::git-pull[]
207+
+
208+
Only useful when merging.
209+
endif::git-pull[]

0 commit comments

Comments
 (0)