Skip to content

Commit e0677dc

Browse files
authored
Merge branch 'gitgitgadget:master' into mm/ci-diagnose-hangs
2 parents c9a38b4 + f85a7e6 commit e0677dc

136 files changed

Lines changed: 4627 additions & 1933 deletions

File tree

Some content is hidden

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

.b4-config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Note that these are default values that you can tweak via the typical
2+
# git-config(1) machinery. You thus shouldn't ever have to change this file.
3+
# See also https://b4.docs.kernel.org/en/latest/config.html.
4+
[b4]
5+
send-same-thread = shallow
6+
prep-cover-template = ./.b4-cover-template

.b4-cover-template

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
${cover}
2+
3+
---
4+
${shortlog}
5+
6+
${diffstat}
7+
8+
${range_diff}
9+
---
10+
base-commit: ${base_commit}
11+
${prerequisites}

Documentation/MyFirstContribution.adoc

Lines changed: 122 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ We can note a few things:
790790
v3", etc. in place of "PATCH". For example, "[PATCH v2 1/3]" would be the first of
791791
three patches in the second iteration. Each iteration is sent with a new cover
792792
letter (like "[PATCH v2 0/3]" above), itself a reply to the cover letter of the
793-
previous iteration (more on that below).
793+
first iteration (more on that below).
794794

795795
NOTE: A single-patch topic is sent with "[PATCH]", "[PATCH v2]", etc. without
796796
_i_/_n_ numbering (in the above thread overview, no single-patch topic appears,
@@ -833,7 +833,7 @@ This patchset is part of the MyFirstContribution tutorial and should not
833833
be merged.
834834
----
835835

836-
At this point the tutorial diverges, in order to demonstrate two
836+
At this point the tutorial diverges, in order to demonstrate three
837837
different methods of formatting your patchset and getting it reviewed.
838838

839839
The first method to be covered is GitGitGadget, which is useful for those
@@ -845,9 +845,14 @@ more fine-grained control over the emails to be sent. This method requires some
845845
setup which can change depending on your system and will not be covered in this
846846
tutorial.
847847

848+
The third method to be covered is `b4`, which builds on top of `git
849+
format-patch` and `git send-email`. This method is the recommended way to
850+
submit patches via mail as it automates a lot of the bookkeeping required by
851+
`git send-email`.
852+
848853
Regardless of which method you choose, your engagement with reviewers will be
849-
the same; the review process will be covered after the sections on GitGitGadget
850-
and `git send-email`.
854+
the same; the review process will be covered after the sections on GitGitGadget,
855+
`git send-email` and `b4`.
851856

852857
[[howto-ggg]]
853858
== Sending Patches via GitGitGadget
@@ -1214,7 +1219,7 @@ between your last version and now, if it's something significant. You do not
12141219
need the exact same body in your second cover letter; focus on explaining to
12151220
reviewers the changes you've made that may not be as visible.
12161221

1217-
You will also need to go and find the Message-ID of your previous cover letter.
1222+
You will also need to go and find the Message-ID of your first cover letter.
12181223
You can either note it when you send the first series, from the output of `git
12191224
send-email`, or you can look it up on the
12201225
https://lore.kernel.org/git[mailing list]. Find your cover letter in the
@@ -1227,8 +1232,8 @@ Message-ID: <foo.12345.author@example.com>
12271232

12281233
Your Message-ID is `<foo.12345.author@example.com>`. This example will be used
12291234
below as well; make sure to replace it with the correct Message-ID for your
1230-
**previous cover letter** - that is, if you're sending v2, use the Message-ID
1231-
from v1; if you're sending v3, use the Message-ID from v2.
1235+
**first cover letter** - that is, for any subsequent version that you send,
1236+
always use the Message-ID from v1.
12321237

12331238
While you're looking at the email, you should also note who is CC'd, as it's
12341239
common practice in the mailing list to keep all CCs on a thread. You can add
@@ -1296,6 +1301,87 @@ index 88f126184c..38da593a60 100644
12961301
2.21.0.392.gf8f6787159e-goog
12971302
----
12981303

1304+
[[howto-b4]]
1305+
== Sending Patches with `b4`
1306+
1307+
`b4` is a tool that builds on top of `git format-patch` and `git send-email`.
1308+
It automates much of the bookkeeping involved in sending a patch series to a
1309+
mailing-list-based project.
1310+
1311+
Refer to the https://b4.docs.kernel.org/[b4 documentation] for a full reference.
1312+
1313+
[[prep-b4]]
1314+
=== Preparing a Patch Series
1315+
1316+
`b4` tracks your patch series as a branch. To start tracking the `psuh` branch
1317+
you have been working on, run:
1318+
1319+
----
1320+
$ b4 prep --enroll master
1321+
----
1322+
1323+
This enrolls the current branch, using `master` as the base of the topic. `b4`
1324+
manages the cover letter as part of the branch, so you can edit it at any time
1325+
with:
1326+
1327+
----
1328+
$ b4 prep --edit-cover
1329+
----
1330+
1331+
The cover letter not only tracks the content of the top-level mail, but also
1332+
the set of recipients. You can add recipients by adding `To:` and `Cc:`
1333+
trailer lines.
1334+
1335+
[[send-b4]]
1336+
=== Sending the Patches
1337+
1338+
Before sending the series out for real, you can inspect what `b4` would send by
1339+
passing `--dry-run`:
1340+
1341+
----
1342+
$ b4 send --dry-run
1343+
----
1344+
1345+
Once you are happy with the result, send the series with:
1346+
1347+
----
1348+
$ b4 send
1349+
----
1350+
1351+
[[v2-b4]]
1352+
=== Sending v2
1353+
1354+
When you are ready to send a new iteration of your series, refine your
1355+
patches as usual using linkgit:git-rebase[1]. Note that you typically want to
1356+
rebase on top of the cover letter. You can configure an alias to enable easy
1357+
rebases going forward:
1358+
1359+
---
1360+
$ git config set alias.b4-rebase 'rebase "HEAD^{/--- b4-submit-tracking ---}"'
1361+
$ git b4-rebase -i
1362+
---
1363+
1364+
Before sending out the new version you should also update the cover letter with
1365+
`b4 prep --edit-cover` to note the relevant changes compared to the previous
1366+
version. You can inspect the changes between the two versions with `b4 prep
1367+
--compare-to=v1`.
1368+
1369+
Same as with the first version, you can use `b4 send` to send out the second
1370+
version. `b4` automatically bumps the version to `v2`, generates the range-diff
1371+
against the previous iteration, and threads the new series as a reply to the
1372+
cover letter of the first version.
1373+
1374+
[[configure-b4]]
1375+
=== Configure b4
1376+
1377+
`b4` can be configured via linkgit:git-config[1]. In addition to that, projects
1378+
can have their own set of defaults in `.b4-config` in the root tree, which also
1379+
uses Git's config format. The user's configuration always takes precedence over
1380+
the per-project defaults.
1381+
1382+
Refer to the https://b4.docs.kernel.org/en/latest/config.html[b4 config documentation]
1383+
for more information on the available options.
1384+
12991385
[[now-what]]
13001386
== My Patch Got Emailed - Now What?
13011387

@@ -1330,18 +1416,42 @@ previous one" patches over 2 days), reviewers would strongly prefer if a
13301416
single polished version came 2 days later instead, and that version with
13311417
fewer mistakes were the only one they would need to review.
13321418

1419+
This consideration applies not only when going from the initial patch to v2,
1420+
but also to later iterations of the same series. There is no fixed rule for how
1421+
long to wait before sending a new version. A useful default is to send at most
1422+
one new version of the same patch series per day. This gives multiple reviewers
1423+
time to comment, gives reviewers across time zones a fair chance to
1424+
participate, lets you batch feedback together, and gives you time to think
1425+
through the comments you received. Knowing that you should not immediately send
1426+
another version also encourages you to review the patches more carefully before
1427+
sending them, catch small mistakes such as typos and off-by-one errors
1428+
yourself, and let reviewers spend more of their attention on design,
1429+
algorithms, and other substantial issues.
1430+
1431+
The right timing depends on the topic and the feedback. Larger series usually
1432+
need more review time. If the only comments so far are minor, such as typo
1433+
fixes, it often makes sense to wait a little longer in case deeper reviews are
1434+
still coming. If the comments call for substantial rework, do not rush out an
1435+
updated version before you have reviewed the larger changes carefully. Instead,
1436+
reply to the review that prompted the rewrite, say that you are preparing a
1437+
substantial rework, and mention which parts of the current series will become
1438+
obsolete so reviewers can avoid spending time on them until the updated series
1439+
is ready.
1440+
13331441

13341442
[[reviewing]]
13351443
=== Responding to Reviews
13361444

13371445
After a few days, you will hopefully receive a reply to your patchset with some
13381446
comments. Woohoo! Now you can get back to work.
13391447

1340-
It's good manners to reply to each comment, notifying the reviewer that you have
1341-
made the change suggested, feel the original is better, or that the comment
1342-
inspired you to do something a new way which is superior to both the original
1343-
and the suggested change. This way reviewers don't need to inspect your v2 to
1344-
figure out whether you implemented their comment or not.
1448+
It's good manners to reply to each comment in the mailing list discussion
1449+
instead of letting the next version of your patch be your only response. Tell
1450+
the reviewer whether you plan to make the suggested change, keep the original,
1451+
or pursue a different approach. This way reviewers can respond to your reasoning
1452+
before you spend time preparing a version they may not agree with, and later do
1453+
not need to inspect your v2 to figure out whether you implemented their comment
1454+
or not.
13451455

13461456
Reviewers may ask you about what you wrote in the patchset, either in
13471457
the proposed commit log message or in the changes themselves. You

Documentation/RelNotes/2.56.0.adoc

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
Git v2.56 Release Notes
2+
=======================
3+
4+
UI, Workflows & Features
5+
------------------------
6+
7+
* Advice shown by "git status" when the local branch is behind or has
8+
diverged from its push branch has been updated to suggest "git pull
9+
<remote> <branch>".
10+
11+
* The handling of promisor-remote protocol capability has been updated
12+
to allow the other side to add to the list of promisor remotes via the
13+
'promisor.acceptFromServerURL' configuration variable.
14+
15+
* The 'ort' merge backend has been hardened against corrupt trees by
16+
ensuring it aborts under appropriate error conditions.
17+
18+
* The `fetch.followRemoteHEAD` configuration variable has been added to
19+
provide a default for the per-remote `remote.<name>.followRemoteHEAD`
20+
setting.
21+
22+
* "git log --follow" has been updated to better handle non-linear
23+
history, in which the path being tracked gets renamed differently in
24+
multiple history lines.
25+
26+
* The "git repo info" command has been taught new keys to output both
27+
absolute and relative paths for "gitdir" and "commondir", supported by
28+
a new path-formatting helper extracted from "git rev-parse".
29+
30+
31+
Performance, Internal Implementation, Development Support etc.
32+
--------------------------------------------------------------
33+
34+
* The refactoring of 'setup.c' has been continued to drop remaining
35+
global state (`git_work_tree_cfg`, `is_bare_repository_cfg`), updating
36+
`is_bare_repository()` to no longer implicitly rely on
37+
`the_repository`.
38+
39+
* Project-specific configuration for b4 has been introduced, and the
40+
documentation has been updated to recommend using it as a
41+
streamlined method for submitting patches.
42+
43+
* The default format path of git cat-file --batch has been optimized
44+
to use strbuf_add_oid_hex() and strbuf_add_uint() instead of
45+
strbuf_addf(), yielding a noticeable speedup.
46+
47+
* Commands that list branches and tags (like git branch and git tag)
48+
have been optimized to pass the namespace prefix when initializing
49+
their ref iterator, avoiding a loose-ref scaling regression in
50+
repositories with many unrelated loose references.
51+
52+
* The packed object source has been refactored into a proper struct
53+
odb_source.
54+
55+
* The global configuration variables protect_hfs and protect_ntfs have
56+
been migrated into struct repo_config_values to tie them to
57+
per-repository configuration state.
58+
59+
* The trailer sections in SubmittingPatches have been updated to
60+
encourage use of standard trailers.
61+
62+
* The documentation in SubmittingPatches has been updated to clarify how
63+
patch contributors should respond to design and viability critiques,
64+
and how the resolution of such critiques should be recorded in the
65+
final commit messages.
66+
67+
* The pack-objects command has been updated to support reachability
68+
bitmaps and delta-islands concurrently with the `--path-walk` option,
69+
allowing faster packaging by falling back to path-walk when bitmaps
70+
cannot fully satisfy the request.
71+
72+
* Documentation on community contribution guidelines has been updated to
73+
encourage replying to review comments before rerolling, and to advise
74+
a default limit of at most one reroll per day to give reviewers across
75+
different time zones enough time to participate.
76+
77+
78+
Fixes since v2.55
79+
-----------------
80+
81+
* A regression in the error diagnosis code for invalid .git files has
82+
been fixed, avoiding a potential NULL-pointer crash when reporting
83+
that a .git file does not point to a valid repository.
84+
(merge 54a441bcea jk/setup-gitfile-diag-fix later to maint).
85+
86+
* Support for hashing loose or packed objects larger than 4GB on Windows
87+
and other LLP64 platforms has been improved by converting object header
88+
buffers and data-handling functions from 'unsigned long' to 'size_t'.
89+
(merge d99e13d0be po/hash-object-size-t later to maint).
90+
91+
* The display of the rebase todo list in "git status" has been
92+
improved to correctly abbreviate object IDs for more commands and
93+
avoid misinterpreting refs as object IDs.
94+
(merge 6f34e5f9e3 pw/status-rebase-todo later to maint).
95+
96+
* Reference backend configuration has been updated to load lazily to
97+
avoid recursive calls during repository initialization when 'onbranch'
98+
configuration conditions are evaluated. This has also fixed a memory
99+
leak and allowed the unused `chdir_notify_reparent()` machinery to be
100+
dropped.
101+
(merge d6522d01df ps/refs-onbranch-fixes later to maint).
102+
103+
* The connectivity check has been refactored to search for promisor
104+
objects in a generic way using the object database interface,
105+
rather than iterating packfiles directly. This allows connectivity
106+
checks to work properly in repositories that do not use packfiles.
107+
(merge 66ee9cb930 ps/connected-generic-promisor-checks later to maint).
108+
109+
* A test checking interactions between git rebase --quit and
110+
autostash in t3420-rebase-autostash.sh has been corrected to use
111+
test_path_is_missing instead of ! grep on a file that shouldn't
112+
exist in the conflicted state.
113+
(merge eaad121fef sg/t3420-do-not-grep-in-missing-file later to maint).

0 commit comments

Comments
 (0)