Skip to content

Commit eb0d781

Browse files
committed
Merge branch 'main' of github.com:git/git
* 'main' of github.com:git/git: list-objects-filter: initialize sub-filter structs Git 2.38-rc1 Final batch before -rc1 builtin/diagnose.c: don't translate the two mode values t/Makefile: remove 'test-results' on 'make clean' gc: don't translate literal commands Documentation: clean up various typos in technical docs Documentation: clean up a few misspelled word typos version: fix builtin linking & documentation diagnose: add to command-list.txt Documentation: add ReviewingGuidelines commit-graph: Fix missing closedir in expire_commit_graphs diagnose.c: refactor to safely use 'd_type' help: fix doubled words in explanation for developer interfaces api docs: link to html version of api-trace2 docs: fix a few recently broken links reftable: use a pointer for pq_entry param
2 parents 82958c3 + 4b79ee4 commit eb0d781

32 files changed

+284
-48
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@
181181
/git-verify-commit
182182
/git-verify-pack
183183
/git-verify-tag
184+
/git-version
184185
/git-web--browse
185186
/git-whatchanged
186187
/git-worktree

Documentation/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ SP_ARTICLES += howto/coordinate-embargoed-releases
103103
API_DOCS = $(patsubst %.txt,%,$(filter-out technical/api-index-skel.txt technical/api-index.txt, $(wildcard technical/api-*.txt)))
104104
SP_ARTICLES += $(API_DOCS)
105105

106+
TECH_DOCS += ReviewingGuidelines
106107
TECH_DOCS += MyFirstContribution
107108
TECH_DOCS += MyFirstObjectWalk
108109
TECH_DOCS += SubmittingPatches

Documentation/MyFirstContribution.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,7 @@ all named like `v2-000n-my-commit-subject.patch`. `-v2` will also format
11601160
your patches by prefixing them with "[PATCH v2]" instead of "[PATCH]",
11611161
and your range-diff will be prefaced with "Range-diff against v1".
11621162

1163-
Afer you run this command, `format-patch` will output the patches to the `psuh/`
1163+
After you run this command, `format-patch` will output the patches to the `psuh/`
11641164
directory, alongside the v1 patches. Using a single directory makes it easy to
11651165
refer to the old v1 patches while proofreading the v2 patches, but you will need
11661166
to be careful to send out only the v2 patches. We will use a pattern like

Documentation/MyFirstObjectWalk.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ the arguments to `traverse_commit_list()`.
534534
- `void *show_data`: A context buffer which is passed in turn to `show_commit`
535535
and `show_object`.
536536

537-
In addition, `traverse_commit_list_filtered()` has an additional paramter:
537+
In addition, `traverse_commit_list_filtered()` has an additional parameter:
538538

539539
- `struct oidset *omitted`: A linked-list of object IDs which the provided
540540
filter caused to be omitted.

Documentation/RelNotes/2.38.0.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,14 @@ Fixes since v2.37
390390
been corrected.
391391
(merge 49ca2fba39 jk/proto-v2-ref-prefix-fix later to maint).
392392

393+
* A result from opendir() was leaking in the commit-graph expiration
394+
codepath, which has been plugged.
395+
(merge 12f1ae5324 ml/commit-graph-expire-dir-leak-fix later to maint).
396+
397+
* Just like we have coding guidelines, we now have guidelines for
398+
reviewers.
399+
(merge e01b851923 vd/doc-reviewing-guidelines later to maint).
400+
393401
* Other code cleanup, docfix, build fix, etc.
394402
(merge 77b9e85c0f vd/fix-perf-tests later to maint).
395403
(merge 0682bc43f5 jk/test-crontab-fixes later to maint).

Documentation/ReviewingGuidelines.txt

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
Reviewing Patches in the Git Project
2+
====================================
3+
4+
Introduction
5+
------------
6+
The Git development community is a widely distributed, diverse, ever-changing
7+
group of individuals. Asynchronous communication via the Git mailing list poses
8+
unique challenges when reviewing or discussing patches. This document contains
9+
some guiding principles and helpful tools you can use to make your reviews both
10+
more efficient for yourself and more effective for other contributors.
11+
12+
Note that none of the recommendations here are binding or in any way a
13+
requirement of participation in the Git community. They are provided as a
14+
resource to supplement your skills as a contributor.
15+
16+
Principles
17+
----------
18+
19+
Selecting patch(es) to review
20+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21+
If you are looking for a patch series in need of review, start by checking
22+
latest "What's cooking in git.git" email
23+
(https://lore.kernel.org/git/[email protected]/[example]). The "What's
24+
cooking" emails & replies can be found using the query `s:"What's cooking"` on
25+
the https://lore.kernel.org/git/[`lore.kernel.org` mailing list archive];
26+
alternatively, you can find the contents of the "What's cooking" email tracked
27+
in `whats-cooking.txt` on the `todo` branch of Git. Topics tagged with "Needs
28+
review" and those in the "[New Topics]" section are typically those that would
29+
benefit the most from additional review.
30+
31+
Patches can also be searched manually in the mailing list archive using a query
32+
like `s:"PATCH" -s:"Re:"`. You can browse these results for topics relevant to
33+
your expertise or interest.
34+
35+
If you've already contributed to Git, you may also be CC'd in another
36+
contributor's patch series. These are topics where the author feels that your
37+
attention is warranted. This may be because their patch changes something you
38+
wrote previously (making you a good judge of whether the new approach does or
39+
doesn't work), or because you have the expertise to provide an exceptionally
40+
helpful review. There is no requirement to review these patches but, in the
41+
spirit of open source collaboration, you should strongly consider doing so.
42+
43+
Reviewing patches
44+
~~~~~~~~~~~~~~~~~
45+
While every contributor takes their own approach to reviewing patches, here are
46+
some general pieces of advice to make your reviews as clear and helpful as
47+
possible. The advice is broken into two rough categories: high-level reviewing
48+
guidance, and concrete tips for interacting with patches on the mailing list.
49+
50+
==== High-level guidance
51+
- Remember to review the content of commit messages for correctness and clarity,
52+
in addition to the code change in the patch's diff. The commit message of a
53+
patch should accurately and fully explain the code change being made in the
54+
diff.
55+
56+
- Reviewing test coverage is an important - but easy to overlook - component of
57+
reviews. A patch's changes may be covered by existing tests, or new tests may
58+
be introduced to exercise new behavior. Checking out a patch or series locally
59+
allows you to manually mutate lines of new & existing tests to verify expected
60+
pass/fail behavior. You can use this information to verify proper coverage or
61+
to suggest additional tests the author could add.
62+
63+
- When providing a recommendation, be as clear as possible about whether you
64+
consider it "blocking" (the code would be broken or otherwise made worse if an
65+
issue isn't fixed) or "non-blocking" (the patch could be made better by taking
66+
the recommendation, but acceptance of the series does not require it).
67+
Non-blocking recommendations can be particularly ambiguous when they are
68+
related to - but outside the scope of - a series ("nice-to-have"s), or when
69+
they represent only stylistic differences between the author and reviewer.
70+
71+
- When commenting on an issue, try to include suggestions for how the author
72+
could fix it. This not only helps the author to understand and fix the issue,
73+
it also deepens and improves your understanding of the topic.
74+
75+
- Reviews do not need to exclusively point out problems. Feel free to "think out
76+
loud" in your review: describe how you read & understood a complex section of
77+
a patch, ask a question about something that confused you, point out something
78+
you found exceptionally well-written, etc. In particular, uplifting feedback
79+
goes a long way towards encouraging contributors to participate more actively
80+
in the Git community.
81+
82+
==== Performing your review
83+
- Provide your review comments per-patch in a plaintext "Reply-All" email to the
84+
relevant patch. Comments should be made inline, immediately below the relevant
85+
section(s).
86+
87+
- You may find that the limited context provided in the patch diff is sometimes
88+
insufficient for a thorough review. In such cases, you can review patches in
89+
your local tree by either applying patches with linkgit:git-am[1] or checking
90+
out the associated branch from https://github.com/gitster/git once the series
91+
is tracked there.
92+
93+
- Large, complicated patch diffs are sometimes unavoidable, such as when they
94+
refactor existing code. If you find such a patch difficult to parse, try
95+
reviewing the diff produced with the `--color-moved` and/or
96+
`--ignore-space-change` options.
97+
98+
- If a patch is long, you are encouraged to delete parts of it that are
99+
unrelated to your review from the email reply. Make sure to leave enough
100+
context for readers to understand your comments!
101+
102+
- If you cannot complete a full review of a series all at once, consider letting
103+
the author know (on- or off-list) if/when you plan to review the rest of the
104+
series.
105+
106+
Completing a review
107+
~~~~~~~~~~~~~~~~~~~
108+
Once each patch of a series is reviewed, the author (and/or other contributors)
109+
may discuss the review(s). This may result in no changes being applied, or the
110+
author will send a new version of their patch(es).
111+
112+
After a series is rerolled in response to your or others' review, make sure to
113+
re-review the updates. If you are happy with the state of the patch series,
114+
explicitly indicate your approval (typically with a reply to the latest
115+
version's cover letter). Optionally, you can let the author know that they can
116+
add a "Reviewed-by: <you>" trailer if they resubmit the reviewed patch verbatim
117+
in a later iteration of the series.
118+
119+
Finally, subsequent "What's cooking" emails may explicitly ask whether a
120+
reviewed topic is ready for merging to the `next` branch (typically phrased
121+
"Will merge to \'next\'?"). You can help the maintainer and author by responding
122+
with a short description of the state of your (and others', if applicable)
123+
review, including the links to the relevant thread(s).
124+
125+
Terminology
126+
-----------
127+
nit: ::
128+
Denotes a small issue that should be fixed, such as a typographical error
129+
or mis-alignment of conditions in an `if()` statement.
130+
131+
aside: ::
132+
optional: ::
133+
non-blocking: ::
134+
Indicates to the reader that the following comment should not block the
135+
acceptance of the patch or series. These are typically recommendations
136+
related to code organization & style, or musings about topics related to
137+
the patch in question, but beyond its scope.
138+
139+
s/<before>/<after>/::
140+
Shorthand for "you wrote <before>, but I think you meant <after>," usually
141+
for misspellings or other typographical errors. The syntax is a reference
142+
to "substitute" command commonly found in Unix tools such as `ed`, `sed`,
143+
`vim`, and `perl`.
144+
145+
cover letter::
146+
The "Patch 0" of a multi-patch series. This email describes the
147+
high-level intent and structure of the patch series to readers on the
148+
Git mailing list. It is also where the changelog notes and range-diff of
149+
subsequent versions are provided by the author.
150+
+
151+
On single-patch submissions, cover letter content is typically not sent as a
152+
separate email. Instead, it is inserted between the end of the patch's commit
153+
message (after the `---`) and the beginning of the diff.
154+
155+
#leftoverbits::
156+
Used by either an author or a reviewer to describe features or suggested
157+
changes that are out-of-scope of a given patch or series, but are relevant
158+
to the topic for the sake of discussion.
159+
160+
See Also
161+
--------
162+
link:MyFirstContribution.html[MyFirstContribution]

Documentation/git.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ Repository, command and file interfaces
344344

345345
This documentation discusses repository and command interfaces which
346346
users are expected to interact with directly. See `--user-formats` in
347-
linkgit:git-help[1] for more details on the critera.
347+
linkgit:git-help[1] for more details on the criteria.
348348

349349
include::cmds-userinterfaces.txt[]
350350

Documentation/gitprotocol-capabilities.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,8 @@ the server as well.
388388
Session IDs should be unique to a given process. They must fit within a
389389
packet-line, and must not contain non-printable or whitespace characters. The
390390
current implementation uses trace2 session IDs (see
391-
link:api-trace2.html[api-trace2] for details), but this may change and users of
392-
the session ID should not rely on this fact.
391+
link:technical/api-trace2.html[api-trace2] for details), but this may change
392+
and users of the session ID should not rely on this fact.
393393

394394
GIT
395395
---

Documentation/gitprotocol-v2.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,8 @@ the server as well.
544544
Session IDs should be unique to a given process. They must fit within a
545545
packet-line, and must not contain non-printable or whitespace characters. The
546546
current implementation uses trace2 session IDs (see
547-
link:api-trace2.html[api-trace2] for details), but this may change and users of
548-
the session ID should not rely on this fact.
547+
link:technical/api-trace2.html[api-trace2] for details), but this may change
548+
and users of the session ID should not rely on this fact.
549549

550550
object-info
551551
~~~~~~~~~~~

Documentation/technical/api-error-handling.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ parse-options.c.
4646
returns -1 after reporting the situation to the caller.
4747

4848
These reports will be logged via the trace2 facility. See the "error"
49-
event in link:api-trace2.txt[trace2 API].
49+
event in link:api-trace2.html[trace2 API].
5050

5151
Customizable error handlers
5252
---------------------------

0 commit comments

Comments
 (0)