Skip to content

Commit aec5adb

Browse files
committed
Merge branch 'ps/ref-peeled-tags' into kn/refs-optim-cleanup
* ps/ref-peeled-tags: (92 commits) t7004: do not chdir around in the main process ref-filter: fix stale parsed objects ref-filter: parse objects on demand ref-filter: detect broken tags when dereferencing them refs: don't store peeled object IDs for invalid tags object: add flag to `peel_object()` to verify object type refs: drop infrastructure to peel via iterators refs: drop `current_ref_iter` hack builtin/show-ref: convert to use `reference_get_peeled_oid()` ref-filter: propagate peeled object ID upload-pack: convert to use `reference_get_peeled_oid()` refs: expose peeled object ID via the iterator refs: refactor reference status flags refs: fully reset `struct ref_iterator::ref` on iteration refs: introduce `.ref` field for the base iterator refs: introduce wrapper struct for `each_ref_fn` builtin/repo: add progress meter for structure stats builtin/repo: add keyvalue and nul format for structure stats builtin/repo: add object counts in structure output builtin/repo: introduce structure subcommand ...
2 parents 143f58e + 61ac8ba commit aec5adb

Some content is hidden

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

95 files changed

+3555
-2296
lines changed

Documentation/RelNotes/2.52.0.adoc

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Performance, Internal Implementation, Development Support etc.
100100
101101
* CodingGuidelines now spells out how bitfields are to be written.
102102
103-
* Adjust to the way newer versions of cURL selectivel enables tracing
103+
* Adjust to the way newer versions of cURL selectively enable tracing
104104
options, so that our tests can continue to work.
105105
(merge 1b5a6bfff3 jk/curl-global-trace-components later to maint).
106106
@@ -127,6 +127,10 @@ Performance, Internal Implementation, Development Support etc.
127127
* Documentation for "git log --pretty" options has been updated
128128
to make it easier to translate.
129129
130+
* Instead of three library archives (one for git, one for reftable,
131+
and one for xdiff), roll everything into a single libgit.a archive.
132+
This would help later effort to FFI into Rust.
133+
130134
131135
Fixes since v2.51
132136
-----------------
@@ -212,13 +216,13 @@ including security updates, are included in this release.
212216
name.
213217
(merge bcb20dda83 js/doc-gitk-history later to maint).
214218

215-
* Update the instruction to use of GGG in the MyFirstContribution
219+
* Update the instructions for using GGG in the MyFirstContribution
216220
document to say that a GitHub PR could be made against `git/git`
217221
instead of `gitgitgadget/git`.
218222
(merge 37001cdbc4 ds/doc-ggg-pr-fork-clarify later to maint).
219223

220224
* Makefile tried to run multiple "cargo build" which would not work
221-
very well; serialize their execution to work it around.
225+
very well; serialize their execution to work around this problem.
222226
(merge 0eeacde50e da/cargo-serialize later to maint).
223227

224228
* "git repack --path-walk" lost objects in some corner cases, which
@@ -294,12 +298,12 @@ including security updates, are included in this release.
294298
updated.
295299
(merge 54a60e5b38 kh/you-still-use-whatchanged-fix later to maint).
296300

297-
* Clang-format update to let our control macros formatted the way we
301+
* Clang-format update to let our control macros be formatted the way we
298302
had them traditionally, e.g., "for_each_string_list_item()" without
299303
space before the parentheses.
300304
(merge 3721541d35 jt/clang-format-foreach-wo-space-before-parenthesis later to maint).
301305

302-
* A few places where an size_t value was cast to curl_off_t without
306+
* A few places where a size_t value was cast to curl_off_t without
303307
checking has been updated to use the existing helper function.
304308
(merge ecc5749578 js/curl-off-t-fixes later to maint).
305309

@@ -329,6 +333,19 @@ including security updates, are included in this release.
329333
you would get from "git format-patch --notes=..." for a singleton
330334
patch.
331335

336+
* The code in "git add -p" and friends to iterate over hunks was
337+
riddled with bugs, which has been corrected.
338+
339+
* A few more things that patch authors can do to help maintainer to
340+
keep track of their topics better.
341+
(merge 1a41698841 tb/doc-submitting-patches later to maint).
342+
343+
* An earlier addition to "git diff --no-index A B" to limit the
344+
output with pathspec after the two directories misbehaved when
345+
these directories were given with a trailing slash, which has been
346+
corrected.
347+
(merge c0bec06cfe jk/diff-no-index-with-pathspec-fix later to maint).
348+
332349
* Other code cleanup, docfix, build fix, etc.
333350
(merge 823d537fa7 kh/doc-git-log-markup-fix later to maint).
334351
(merge cf7efa4f33 rj/t6137-cygwin-fix later to maint).
@@ -359,3 +376,7 @@ including security updates, are included in this release.
359376
(merge 1c573a3451 en/doc-merge-tree-describe-merge-base later to maint).
360377
(merge 84a6bf7965 ja/doc-markup-attached-paragraph-fix later to maint).
361378
(merge 399694384b kh/doc-patch-id-markup-fix later to maint).
379+
(merge 15b8abde07 js/mingw-includes-cleanup later to maint).
380+
(merge 3860985105 js/unreachable-workaround-for-no-symlink-head later to maint).
381+
(merge b3ac6e737d kh/doc-continued-paragraph-fix later to maint).
382+
(merge 2cebca0582 tb/cat-file-objectmode-update later to maint).

Documentation/SubmittingPatches

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -579,14 +579,27 @@ line via `git format-patch --notes`.
579579
[[the-topic-summary]]
580580
*This is EXPERIMENTAL*.
581581

582-
When sending a topic, you can propose a one-paragraph summary that
583-
should appear in the "What's cooking" report when it is picked up to
584-
explain the topic. If you choose to do so, please write a 2-5 line
585-
paragraph that will fit well in our release notes (see many bulleted
586-
entries in the Documentation/RelNotes/* files for examples), and make
587-
it the first paragraph of the cover letter. For a single-patch
588-
series, use the space between the three-dash line and the diffstat, as
589-
described earlier.
582+
When sending a topic, you can optionally propose a topic name and/or a
583+
one-paragraph summary that should appear in the "What's cooking"
584+
report when it is picked up to explain the topic. If you choose to do
585+
so, please write a 2-5 line paragraph that will fit well in our
586+
release notes (see many bulleted entries in the
587+
Documentation/RelNotes/* files for examples), and make it the first
588+
(or second, if including a suggested topic name) paragraph of the
589+
cover letter. If suggesting a topic name, use the format
590+
"XX/your-topic-name", where "XX" is a stand-in for the primary
591+
author's initials, and "your-topic-name" is a brief, dash-delimited
592+
description of what your topic does. For a single-patch series, use
593+
the space between the three-dash line and the diffstat, as described
594+
earlier.
595+
596+
[[multi-series-efforts]]
597+
If your patch series is part of a larger effort spanning multiple
598+
patch series, briefly describe the broader goal, and state where the
599+
current series fits into that goal. If you are suggesting a topic
600+
name as in <<the-topic-summary, section above>>, consider
601+
"XX/the-broader-goal-part-one", "XX/the-broader-goal-part-two", and so
602+
on.
590603

591604
[[attachment]]
592605
Do not attach the patch as a MIME attachment, compressed or not.

Documentation/config/core.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ The built-in file system monitor is currently available only on a
7575
limited set of supported platforms. Currently, this includes Windows
7676
and MacOS.
7777
+
78-
Otherwise, this variable contains the pathname of the "fsmonitor"
79-
hook command.
78+
Otherwise, this variable contains the pathname of the "fsmonitor"
79+
hook command.
8080
+
8181
This hook command is used to identify all files that may have changed
8282
since the requested date/time. This information is used to speed up

Documentation/config/stash.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ endif::git-stash[]
1111
behave as if `--index` was supplied. Defaults to false.
1212
ifndef::git-stash[]
1313
See the descriptions in linkgit:git-stash[1].
14+
+
15+
This also affects invocations of linkgit:git-stash[1] via `--autostash` from
16+
commands like linkgit:git-merge[1], linkgit:git-rebase[1], and
17+
linkgit:git-pull[1].
1418
endif::git-stash[]
1519

1620
`stash.showIncludeUntracked`::

Documentation/git-add.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,10 +342,10 @@ patch::
342342
d - do not stage this hunk or any of the later hunks in the file
343343
g - select a hunk to go to
344344
/ - search for a hunk matching the given regex
345-
j - leave this hunk undecided, see next undecided hunk
346-
J - leave this hunk undecided, see next hunk
347-
k - leave this hunk undecided, see previous undecided hunk
348-
K - leave this hunk undecided, see previous hunk
345+
j - go to the next undecided hunk, roll over at the bottom
346+
J - go to the next hunk, roll over at the bottom
347+
k - go to the previous undecided hunk, roll over at the top
348+
K - go to the previous hunk, roll over at the top
349349
s - split the current hunk into smaller hunks
350350
e - manually edit the current hunk
351351
p - print the current hunk

Documentation/git-config.adoc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,15 @@ OPTIONS
117117

118118
--comment <message>::
119119
Append a comment at the end of new or modified lines.
120-
121-
If _<message>_ begins with one or more whitespaces followed
122-
by "#", it is used as-is. If it begins with "#", a space is
123-
prepended before it is used. Otherwise, a string " # " (a
124-
space followed by a hash followed by a space) is prepended
125-
to it. And the resulting string is placed immediately after
126-
the value defined for the variable. The _<message>_ must
127-
not contain linefeed characters (no multi-line comments are
128-
permitted).
120+
+
121+
If _<message>_ begins with one or more whitespaces followed
122+
by "#", it is used as-is. If it begins with "#", a space is
123+
prepended before it is used. Otherwise, a string " # " (a
124+
space followed by a hash followed by a space) is prepended
125+
to it. And the resulting string is placed immediately after
126+
the value defined for the variable. The _<message>_ must
127+
not contain linefeed characters (no multi-line comments are
128+
permitted).
129129

130130
--all::
131131
With `get`, return all values for a multi-valued key.

Documentation/git-repo.adoc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ SYNOPSIS
99
--------
1010
[synopsis]
1111
git repo info [--format=(keyvalue|nul)] [-z] [<key>...]
12+
git repo structure [--format=(table|keyvalue|nul)]
1213

1314
DESCRIPTION
1415
-----------
@@ -43,6 +44,35 @@ supported:
4344
+
4445
`-z` is an alias for `--format=nul`.
4546

47+
`structure [--format=(table|keyvalue|nul)]`::
48+
Retrieve statistics about the current repository structure. The
49+
following kinds of information are reported:
50+
+
51+
* Reference counts categorized by type
52+
* Reachable object counts categorized by type
53+
54+
+
55+
The output format can be chosen through the flag `--format`. Three formats are
56+
supported:
57+
+
58+
`table`:::
59+
Outputs repository stats in a human-friendly table. This format may
60+
change and is not intended for machine parsing. This is the default
61+
format.
62+
63+
`keyvalue`:::
64+
Each line of output contains a key-value pair for a repository stat.
65+
The '=' character is used to delimit between the key and the value.
66+
Values containing "unusual" characters are quoted as explained for the
67+
configuration variable `core.quotePath` (see linkgit:git-config[1]).
68+
69+
`nul`:::
70+
Similar to `keyvalue`, but uses a NUL character to delimit between
71+
key-value pairs instead of a newline. Also uses a newline character as
72+
the delimiter between the key and value instead of '='. Unlike the
73+
`keyvalue` format, values containing "unusual" characters are never
74+
quoted.
75+
4676
INFO KEYS
4777
---------
4878
In order to obtain a set of values from `git repo info`, you should provide

Documentation/git-rev-parse.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,13 @@ for another option.
174174

175175
Allow oids to be input from any object format that the current
176176
repository supports.
177-
178-
Specifying "sha1" translates if necessary and returns a sha1 oid.
179-
180-
Specifying "sha256" translates if necessary and returns a sha256 oid.
181-
182-
Specifying "storage" translates if necessary and returns an oid in
183-
encoded in the storage hash algorithm.
177+
+
178+
Specifying "sha1" translates if necessary and returns a sha1 oid.
179+
+
180+
Specifying "sha256" translates if necessary and returns a sha256 oid.
181+
+
182+
Specifying "storage" translates if necessary and returns an oid in
183+
encoded in the storage hash algorithm.
184184

185185
Options for Objects
186186
~~~~~~~~~~~~~~~~~~~

Documentation/git-shortlog.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ OPTIONS
4444
describe each commit. '<format>' can be any string accepted
4545
by the `--format` option of 'git log', such as '* [%h] %s'.
4646
(See the "PRETTY FORMATS" section of linkgit:git-log[1].)
47-
48-
Each pretty-printed commit will be rewrapped before it is shown.
47+
+
48+
Each pretty-printed commit will be rewrapped before it is shown.
4949

5050
--date=<format>::
5151
Show dates formatted according to the given date string. (See

Documentation/git-sparse-checkout.adoc

Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -264,34 +264,50 @@ patterns in non-cone mode has a number of shortcomings:
264264
inconsistent.
265265

266266
* It has edge cases where the "right" behavior is unclear. Two examples:
267-
268-
First, two users are in a subdirectory, and the first runs
269-
git sparse-checkout set '/toplevel-dir/*.c'
270-
while the second runs
271-
git sparse-checkout set relative-dir
272-
Should those arguments be transliterated into
273-
current/subdirectory/toplevel-dir/*.c
274-
and
275-
current/subdirectory/relative-dir
276-
before inserting into the sparse-checkout file? The user who typed
277-
the first command is probably aware that arguments to set/add are
278-
supposed to be patterns in non-cone mode, and probably would not be
279-
happy with such a transliteration. However, many gitignore-style
280-
patterns are just paths, which might be what the user who typed the
281-
second command was thinking, and they'd be upset if their argument
282-
wasn't transliterated.
283-
284-
Second, what should bash-completion complete on for set/add commands
285-
for non-cone users? If it suggests paths, is it exacerbating the
286-
problem above? Also, if it suggests paths, what if the user has a
287-
file or directory that begins with either a '!' or '#' or has a '*',
288-
'\', '?', '[', or ']' in its name? And if it suggests paths, will
289-
it complete "/pro" to "/proc" (in the root filesystem) rather than to
290-
"/progress.txt" in the current directory? (Note that users are
291-
likely to want to start paths with a leading '/' in non-cone mode,
292-
for the same reason that .gitignore files often have one.)
293-
Completing on files or directories might give nasty surprises in
294-
all these cases.
267+
+
268+
First, two users are in a subdirectory, and the first runs
269+
+
270+
----
271+
git sparse-checkout set '/toplevel-dir/*.c'
272+
----
273+
+
274+
while the second runs
275+
+
276+
----
277+
git sparse-checkout set relative-dir
278+
----
279+
+
280+
Should those arguments be transliterated into
281+
+
282+
----
283+
current/subdirectory/toplevel-dir/*.c
284+
----
285+
+
286+
and
287+
+
288+
----
289+
current/subdirectory/relative-dir
290+
----
291+
+
292+
before inserting into the sparse-checkout file? The user who typed
293+
the first command is probably aware that arguments to set/add are
294+
supposed to be patterns in non-cone mode, and probably would not be
295+
happy with such a transliteration. However, many gitignore-style
296+
patterns are just paths, which might be what the user who typed the
297+
second command was thinking, and they'd be upset if their argument
298+
wasn't transliterated.
299+
+
300+
Second, what should bash-completion complete on for set/add commands
301+
for non-cone users? If it suggests paths, is it exacerbating the
302+
problem above? Also, if it suggests paths, what if the user has a
303+
file or directory that begins with either a '!' or '#' or has a '*',
304+
'\', '?', '[', or ']' in its name? And if it suggests paths, will
305+
it complete "/pro" to "/proc" (in the root filesystem) rather than to
306+
"/progress.txt" in the current directory? (Note that users are
307+
likely to want to start paths with a leading '/' in non-cone mode,
308+
for the same reason that .gitignore files often have one.)
309+
Completing on files or directories might give nasty surprises in
310+
all these cases.
295311

296312
* The excessive flexibility made other extensions essentially
297313
impractical. `--sparse-index` is likely impossible in non-cone

0 commit comments

Comments
 (0)