Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
9175f6c
Merge branch 'kk/commit-reach-find-all-fix' into kk/merge-base-exhaus…
gitster Jul 11, 2026
669c4ad
Merge branch 'ps/cat-file-remote-object-info' into ps/cat-file-remote…
gitster Jul 25, 2026
b1b008f
odb/streaming: track write stream size in the structure
pks-t Aug 5, 2026
7267822
odb/streaming: drop `is_finished` field
pks-t Aug 5, 2026
8a51f6e
odb/streaming: support streaming arbitrary object types
pks-t Aug 5, 2026
a59e479
odb/streaming: rename `struct odb_read_stream`
pks-t Aug 5, 2026
e837b81
odb/streaming: consolidate read and write streams
pks-t Aug 5, 2026
93dd246
odb/streaming: rename `struct read_object_fd_data`
pks-t Aug 5, 2026
3f8290e
odb/streaming: rename `struct input_zstream_data`
pks-t Aug 5, 2026
ebdd7e1
odb/streaming: unify function names to create new streams
pks-t Aug 5, 2026
c3a8f43
t5701: use test_file_size() to get the size of a file
pabloosabaterr Aug 8, 2026
62e5104
fetch-object-info: detect malformed server responses
pabloosabaterr Aug 8, 2026
d43b4d3
fetch-object-info: pass arguments directly instead of a struct
pabloosabaterr Aug 8, 2026
c5c971d
fetch-object-info: use dedicated struct for the results
pabloosabaterr Aug 8, 2026
50dd6d3
fetch-object-info: die() on the remaining error path
pabloosabaterr Aug 8, 2026
567e62b
transport: drop remote object-info fields from transport struct
peff Aug 8, 2026
7692fa9
protocol-caps: add type support to object-info
pabloosabaterr Aug 8, 2026
afa4ea5
fetch-object-info: parse type from server response
pabloosabaterr Aug 8, 2026
4c842de
serve: advertise type capability
pabloosabaterr Aug 8, 2026
245f2a8
cat-file: unify default format
pabloosabaterr Aug 8, 2026
b0b304c
send-email: clarify missing subject error
HaraldNordgren Aug 10, 2026
5ab204e
parse-options: introduce OPT_HIDDEN_GROUP
chriscool Aug 11, 2026
e455bad
api-parse-options.adoc: document per-option flags
chriscool Aug 11, 2026
08b7e35
api-parse-options.adoc: document hidden and OPT_*_F option macros
chriscool Aug 11, 2026
62c1a58
fast-import: localize 'i' into the 'for' loops using it
chriscool Aug 11, 2026
a895a37
fast-import: use int for some bool flags
chriscool Aug 11, 2026
63112e7
fast-import: factor out option_*() functions
chriscool Aug 11, 2026
417afb2
fast-import: introduce 'struct fast_import_state'
chriscool Aug 11, 2026
ee996af
fast-import: move command state globals into 'struct fast_import_state'
chriscool Aug 11, 2026
27ab581
fast-import: use struct option for usage string
chriscool Aug 11, 2026
87cf4d7
fast-import: use callbacks to parse some options
chriscool Aug 11, 2026
8639376
fast-import: use parse_options() for command line options
chriscool Aug 11, 2026
a09c2f2
fast-import: remove useless from_stream argument
chriscool Aug 11, 2026
cd2ab0e
Documentation/technical: add paint-down-to-common doc
spkrka Aug 11, 2026
fe4877b
test-lib-functions: improve diagnostic output for trace2 data assertions
spkrka Aug 11, 2026
d3180b1
t6600: add test cases for side-exhaustion edge cases
newren Aug 11, 2026
259a45f
t6099: add side-exhaustion regression test
spkrka Aug 11, 2026
6300d71
commit-reach: add trace2 instrumentation to paint_down_to_common()
spkrka Aug 11, 2026
bad3793
t6600: add clock-skew topologies and step counts for edge cases
spkrka Aug 11, 2026
a3e5bad
commit-reach: introduce struct paint_state with per-side counters
spkrka Aug 11, 2026
02d7ba0
commit-reach: terminate merge-base walk when one paint side is exhausted
spkrka Aug 11, 2026
4e08160
commit-reach: move min_generation check into paint_queue_get()
spkrka Aug 11, 2026
56c9056
commit-reach: remove commit-date ordering fallback
spkrka Aug 11, 2026
65cda10
sequencer: release the ODB before spawning git commit
dscho Aug 12, 2026
4b27b7c
Merge branch 'ps/cat-file-remote-object-info-type'
gitster Aug 24, 2026
10d3ea2
Merge branch 'cc/fast-import-usage'
gitster Aug 24, 2026
a2ef06b
Merge branch 'ps/odb-streams'
gitster Aug 24, 2026
6aab7b2
Merge branch 'hn/send-email-missing-subject-error'
gitster Aug 24, 2026
e8e7bf9
Merge branch 'js/sequencer-release-odb-before-commit'
gitster Aug 24, 2026
679a72c
Merge branch 'kk/merge-base-exhaustion'
gitster Aug 24, 2026
593c42f
The 17th batch
gitster Aug 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Documentation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ TECH_DOCS += technical/long-running-process-protocol
TECH_DOCS += technical/multi-pack-index
TECH_DOCS += technical/packfile-uri
TECH_DOCS += technical/pack-heuristics
TECH_DOCS += technical/paint-down-to-common
TECH_DOCS += technical/parallel-checkout
TECH_DOCS += technical/partial-clone
TECH_DOCS += technical/platform-support
Expand Down
26 changes: 26 additions & 0 deletions Documentation/RelNotes/2.56.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,18 @@ UI, Workflows & Features
to remove local branches that are already merged into their tracked
remote-tracking branches.

* The 'remote-object-info' command for 'git cat-file --batch-command'
has been extended to support the '%(objecttype)' placeholder.

* The usage string of 'git fast-import' has been updated to use the
parse_options() API for displaying help, and its SYNOPSIS in the
documentation has been standardized to match.

* The error message given by 'git send-email' when a message file is
missing a 'Subject:' header has been clarified, and the error string
is now terminated with a newline so that Perl avoids appending its
internal source location data.


Performance, Internal Implementation, Development Support etc.
--------------------------------------------------------------
Expand Down Expand Up @@ -381,6 +393,20 @@ Performance, Internal Implementation, Development Support etc.
has been deferred, and the loading of the loose-object map has been
detangled from repository initialization.

* The 'struct odb_read_stream' and 'struct odb_write_stream'
structures have been consolidated into a single unified 'struct
odb_stream' structure, simplifying object database streaming APIs
and enabling streaming of arbitrary object types.

* The sequencer has been updated to release the object database before
spawning 'git commit'. This prevents open file handles from
blocking auto-maintenance tasks, such as repacking, on systems like
Windows where open files cannot be easily unlinked.

* The merge-base computation has been optimized by stopping the walk
early when one side's exclusive commits in the queue are exhausted,
yielding significant speedups for queries with one-sided histories.


Fixes since v2.55
-----------------
Expand Down
17 changes: 7 additions & 10 deletions Documentation/git-cat-file.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -348,15 +348,12 @@ newline. The available atoms are:
after that first run of whitespace (i.e., the "rest" of the
line) are output in place of the `%(rest)` atom.

The command `remote-object-info` only supports the `%(objectname)` and
`%(objectsize)` placeholders. See `CAVEATS` below for more information.
The command `remote-object-info` only supports the `%(objectname)`,
`%(objectsize)` and `%(objecttype)` placeholders. See `CAVEATS` below for more
information.

If no format is specified, the default format is `%(objectname)
%(objecttype) %(objectsize)`, except for `remote-object-info` commands which
use `%(objectname) %(objectsize)` because `%(objecttype)` is not supported yet.

WARNING: When "%(objecttype)" is supported, the default format WILL be unified,
so DO NOT RELY on the current default format to stay the same!!!
%(objecttype) %(objectsize)`.

If `--batch` is specified, or if `--batch-command` is used with the `contents`
command, the object information is followed by the object contents (consisting
Expand Down Expand Up @@ -453,9 +450,9 @@ scripting purposes.
CAVEATS
-------

Note that only `%(objectname)` and `%(objectsize)` are currently
supported by the `remote-object-info` command. Using any other placeholder in
the format string will return an empty string in its position.
Note that only `%(objectname)`, `%(objectsize)` and `%(objecttype)` are
currently supported by the `remote-object-info` command. Using any other
placeholder in the format string will return an empty string in its position.

Note that the sizes of objects on disk are reported accurately, but care
should be taken in drawing conclusions about which refs or objects are
Expand Down
9 changes: 8 additions & 1 deletion Documentation/git-fast-import.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ git-fast-import - Backend for fast Git data importers
SYNOPSIS
--------
[verse]
frontend | 'git fast-import' [<options>]
'git fast-import' [<options>]

DESCRIPTION
-----------
Expand Down Expand Up @@ -65,6 +65,13 @@ Only enable this option if you trust the program generating the
fast-import stream! This option is enabled automatically for
remote-helpers that use the `import` capability, as they are
already trusted to run their own code.
+
Note that this option has to be spelled in full, and has to appear
before any option whose value is separated from it by a space, for
the unsafe `feature` commands in the stream to be allowed. So
`--allow-unsafe` or `--depth 5 --allow-unsafe-features` still refuse
them, while `--allow-unsafe-features --depth 5` and
`--depth=5 --allow-unsafe-features` allow them.

`--signed-tags=<mode>`::
Specify how to handle signed tags. Behaves in the same way as
Expand Down
18 changes: 14 additions & 4 deletions Documentation/gitprotocol-v2.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -558,14 +558,17 @@ object-info

`object-info` is the command to retrieve information about one or more objects.
Its main purpose is to allow a client to make decisions based on this
information without having to fully fetch objects. Object size is the only
information that is currently supported.
information without having to fully fetch objects. Currently only object size
and type are supported.

An `object-info` request takes the following arguments:

size
Requests size information to be returned for each listed object id.

type
Requests type information to be returned for each listed object id.

oid <oid>
Indicates to the server an object which the client wants to obtain
information for. They must be full OIDs.
Expand All @@ -580,11 +583,18 @@ space.
info = *PKT-LINE(attr LF)
*PKT-LINE(obj-info LF)

attr = "size"
attr = "size" | "type"

obj-size = 1*DIGIT

obj-info = obj-id [SP [obj-size]]
obj-type = "blob" | "tree" | "commit" | "tag"

obj-val = obj-size | obj-type

obj-info = obj-id [SP [obj-val *(SP obj-val)]]

The values in `obj-info` appear in the same order as the corresponding `attr`
lines, with exactly one value per requested attribute.

If the server does not recognize the OID, the response will be `<oid> SP`
regardless of the number of attributes requested.
Expand Down
80 changes: 80 additions & 0 deletions Documentation/technical/api-parse-options.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,77 @@ Data Structure

The main data structure is an array of the `option` struct,
say `static struct option builtin_add_options[]`.

Option flags
~~~~~~~~~~~~

Each option can carry flags in the `flags` field of its `option`
struct. These are per-option flags and are distinct from the
`parse_options()` flags described above; they are usually set through
the `OPT_*_F()` macro variants (see below) rather than by hand. They
are the bitwise-or of:

`PARSE_OPT_OPTARG`::
The option's argument is optional, i.e. both `--option` and
`--option=<value>` are accepted.

`PARSE_OPT_NOARG`::
The option takes no argument at all. Using `--option=<value>`
is rejected.

`PARSE_OPT_NONEG`::
Disable the automatically generated negated `--no-option`
form.

`PARSE_OPT_HIDDEN`::
Hide the option: it is omitted from the usage shown by
`git <cmd> -h`, but is still shown by `git <cmd> --help-all`.
The option is parsed as usual either way. This is meant for
deprecated, advanced or otherwise uncommon options.

`PARSE_OPT_LASTARG_DEFAULT`::
The no-argument form is only accepted when the option is the
last token on the command line; used earlier, it still
requires an argument. Should not be combined with
`PARSE_OPT_OPTARG`.

`PARSE_OPT_NODASH`::
The option is a single character without a leading dash, such
as the `+` used by some commands.

`PARSE_OPT_LITERAL_ARGHELP`::
Use the argument help string (`argh`) verbatim in the usage
output instead of surrounding it with `<>` or `[]`. Useful when
`argh` already contains a hand-formatted description.

`PARSE_OPT_FROM_ALIAS`::
Internal flag, set on options that were expanded from a
configured alias. It should not be set by callers.

`PARSE_OPT_NOCOMPLETE`::
Do not offer this option for completion.

`PARSE_OPT_COMP_ARG`::
The option's argument, rather than the option itself, is what
should be completed.

`PARSE_OPT_CMDMODE`::
The option is one of several mutually exclusive "command mode"
options that share the same variable. Using more than one of
them at once is rejected.

Macros
~~~~~~

There are some macros to easily define options:

Many of the macros below have an `_F` variant (for example `OPT_BOOL_F`,
`OPT_STRING_F`, `OPT_INTEGER_F`, `OPT_SET_INT_F`, `OPT_BIT_F` and
`OPT_CALLBACK_F`) that takes an additional trailing `flags` argument.
That argument is the bitwise-or of the per-option flags described in the
"Option flags" section above; the non-`_F` macros are simply defined
with `flags` set to `0`.

`OPT__ABBREV(&int_var)`::
Add `--abbrev[=<n>]`.

Expand All @@ -175,10 +244,21 @@ There are some macros to easily define options:
describes the group or an empty string.
Start the description with an upper-case letter.

`OPT_HIDDEN_GROUP(description)`::
Like `OPT_GROUP()`, but the group header carries
`PARSE_OPT_HIDDEN`, so it is only shown by `--help-all` and not
by `-h`. Use it to label a group that contains only hidden
options, which would otherwise show an empty header under `-h`.

`OPT_BOOL(short, long, &int_var, description)`::
Introduce a boolean option. `int_var` is set to one with
`--option` and set to zero with `--no-option`.

`OPT_HIDDEN_BOOL(short, long, &int_var, description)`::
Like `OPT_BOOL()`, but the option carries `PARSE_OPT_HIDDEN`,
so it is hidden from `-h` while still being shown by
`--help-all`.

`OPT_COUNTUP(short, long, &int_var, description)`::
Introduce a count-up option.
Each use of `--option` increments `int_var`, starting from zero
Expand Down
1 change: 1 addition & 0 deletions Documentation/technical/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ articles = [
'multi-pack-index.adoc',
'packfile-uri.adoc',
'pack-heuristics.adoc',
'paint-down-to-common.adoc',
'parallel-checkout.adoc',
'partial-clone.adoc',
'platform-support.adoc',
Expand Down
Loading