Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
78d1e46
Merge branch 'kh/doc-trailers' into kh/trailers-no-urls
gitster Aug 10, 2026
d296c52
Merge branch 'ps/odb-make-creation-pluggable' into ps/odb-eagerly-loa…
gitster Aug 12, 2026
27be716
completion: add 'git history' subcommands
vincent-mailhol Aug 13, 2026
8231551
completion: complete 'git history --empty' values
vincent-mailhol Aug 13, 2026
5bda733
completion: complete 'git history --update-refs' values
vincent-mailhol Aug 13, 2026
328b3b9
completion: complete 'git history split' pathspecs
vincent-mailhol Aug 13, 2026
1c46ce6
setup: create ref and object databases after config is written
pks-t Aug 17, 2026
9879277
odb: decouple source path comparisons from `the_repository`
pks-t Aug 17, 2026
f978f56
odb: eagerly initialize alternates
pks-t Aug 17, 2026
0e67428
odb: drop `loaded_alternates` field
pks-t Aug 17, 2026
0076dc9
odb: drop `alternates_db` field
pks-t Aug 17, 2026
47ef219
odb/source-packed: flag known-bad objects as corrupt and not missing
pks-t Aug 19, 2026
d55f362
odb/source: introduce error status when reading objects
pks-t Aug 19, 2026
3295c34
odb/source: let callers discern missing and corrupt objects
pks-t Aug 19, 2026
63a3257
odb/source: allow `read_object_info()` to bubble up error messages
pks-t Aug 19, 2026
2135b14
odb: handle `OBJECT_INFO_DIE_IF_CORRUPT` generically
pks-t Aug 19, 2026
a6c9837
pack-objects: trace pack bytes written
friel-openai Aug 19, 2026
4958524
worktree add: shouldn't dwim if -b or -B is given
yoichi Aug 20, 2026
7874b2c
builtin/receive-pack: properly clean up keep files
jltobler Aug 20, 2026
ecdda04
odb/transaction: add transaction finalize interface
jltobler Aug 20, 2026
727b99c
builtin/receive-pack: pass shallow file explicitly
jltobler Aug 20, 2026
c59466d
builtin/receive-pack: read unpack limit config lazily
jltobler Aug 20, 2026
255f3a7
builtin/receive-pack: lift global state out of unpack()
jltobler Aug 20, 2026
429dd07
builtin/receive-pack: report unpack errors via strbuf
jltobler Aug 20, 2026
8e84d34
builtin/receive-pack: explicitly pass packfile fd
jltobler Aug 20, 2026
40932d0
odb: return temporary ODB source when set
jltobler Aug 20, 2026
2154d88
odb/transaction: add transaction interface to write packfiles
jltobler Aug 20, 2026
d122e37
trailers: stop recognizing URLs as trailers
LemmingAvalanche Aug 21, 2026
a316d61
odb: introduce interface to generate packfiles
pks-t Aug 21, 2026
f0de4ab
upload-pack: generate packfiles via the object database
pks-t Aug 21, 2026
7d2289a
send-pack: generate packfiles via the object database
pks-t Aug 21, 2026
3f0986b
builtin/bundle: refactor option handling for progress meter
pks-t Aug 21, 2026
9e8558a
bundle: get (mostly) rid of `the_repository`
pks-t Aug 21, 2026
5176dd3
bundle: generate packfiles via the object database
pks-t Aug 21, 2026
4e00f13
odb/files: be less aggressive with geometric repacking
pks-t Aug 11, 2026
9321f59
Merge branch 'yn/worktree-add-no-dwim-with-b'
gitster Aug 31, 2026
6e6f4b5
Merge branch 'ps/odb-generic-corrupt-objects'
gitster Aug 31, 2026
189ff3a
Merge branch 'vm/complete-history'
gitster Aug 31, 2026
8b92a9c
Merge branch 'ps/odb-eagerly-load-alternates'
gitster Aug 31, 2026
1e4d33d
Merge branch 'kh/trailers-no-urls'
gitster Aug 31, 2026
93f737d
Merge branch 'ps/odb-geometric-repack-loose-threshold'
gitster Aug 31, 2026
26e1e47
Merge branch 'jt/receive-pack-pluggable-writes'
gitster Aug 31, 2026
923bf36
Merge branch 'ps/odb-pluggable-pack-generation'
gitster Aug 31, 2026
6e75a57
Merge branch 'fr/pack-objects-trace-pack-bytes'
gitster Aug 31, 2026
1630431
The 21st batch
gitster Aug 31, 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
45 changes: 45 additions & 0 deletions Documentation/RelNotes/2.56.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ UI, Workflows & Features
placeholders, and a quoting inconsistency in the running text has
been fixed.

* The DWIM logic in 'git worktree add' sometimes tried to infer a
remote-tracking branch when an explicit '-b' or '-B' option was
given to create a new branch, causing the explicit branch name to
be ignored, which has been corrected.

* The command line completion (in contrib/) has been taught to handle
the experimental 'git history' command.


Performance, Internal Implementation, Development Support etc.
--------------------------------------------------------------
Expand Down Expand Up @@ -440,6 +448,38 @@ Performance, Internal Implementation, Development Support etc.
reporting failures with a relative path to a sparse directory has
been corrected.

* The object database (odb) API has been refactored to distinguish
between missing objects and corrupt ones by returning more
descriptive error statuses. Both the packed and loose backends now
faithfully propagate error details using a generic strbuf error
mechanism, removing backend-specific leakage from central lookup
paths.

* The object database layer has been simplified by eagerly loading
alternate object directories upon initialization, instead of
deferring it to the first object lookup. This eliminates the need
for scattered lazy-loading calls throughout the codebase and paves
the way for integrating alternates with the pluggable backends.

* The threshold for geometric repacking to trigger based on loose
object count has been adjusted to match that of 'git gc --auto',
preventing over-aggressive repacking during concurrent writes.

* The 'git receive-pack' command has been updated to use a new ODB
transaction interface for writing incoming packfiles, making it more
backend-agnostic.

* The mechanism to generate a packfile corresponding to the result of
a fetch/push has been made pluggable through a set of object
database callback functions, removing hardcoded references to
'pack-objects' and enabling alternative ODBs to serve packfiles
themselves.

* The pack-objects command has been updated to record the total bytes
written to pack files in trace2 output, allowing performance
analysis of different compression settings by comparing the
resulting pack sizes.


Fixes since v2.55
-----------------
Expand Down Expand Up @@ -699,5 +739,10 @@ Fixes since v2.55
been corrected.
(merge 05e2ab1f31 jc/complete-checkout later to maint).

* The trailer parsing machinery has been updated to avoid mistaking
lines that begin with a URL (e.g., 'https://...') as trailer lines.
This prevents intended textual URLs from being mangled or mistakenly
treated as metadata keys.

* Other code cleanup, docfix, build fix, etc.
(merge 026636128f ss/submittingpatches-typofix later to maint).
2 changes: 1 addition & 1 deletion Documentation/config/maintenance.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ maintenance.geometric-repack.auto::
there are packfiles that need to be merged together to retain the
geometric progression, or when there are at least this many loose
objects that would be written into a new packfile. The default value is
100.
6700.

maintenance.geometric-repack.splitFactor::
This integer config option controls the factor used for the geometric
Expand Down
13 changes: 10 additions & 3 deletions Documentation/git-interpret-trailers.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,16 @@ OTHER RULES
What was covered in the previous section are the rules that are relevant
for regular use. The following points are included for completeness.

This command ignores comment lines (see `core.commentString` in
linkgit:git-config[1]). This is for use with the `prepare-commit-msg`
and `commit-msg` hooks.
--
* This command ignores comment lines (see `core.commentString` in
linkgit:git-config[1]). This is for use with the `prepare-commit-msg`
and `commit-msg` hooks.

* Candidate trailer lines that have `:` as the separator, that have no
whitespace before the value part, and that start with `//` are not
recognized as trailers. This is to avoid accidentally interpreting
URLs as trailers (e.g. lines that start with `https://`).
--

OPTIONS
-------
Expand Down
4 changes: 2 additions & 2 deletions builtin/add.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ int cmd_add(int argc,
char *seen = NULL;
char *ps_matched = NULL;
struct lock_file lock_file = LOCK_INIT;
struct odb_transaction *transaction;
struct odb_transaction *transaction = NULL;

repo_config(repo, add_config, NULL);

Expand Down Expand Up @@ -680,7 +680,7 @@ int cmd_add(int argc,

if (chmod_arg && pathspec.nr)
exit_status |= chmod_pathspec(repo, &pathspec, chmod_arg[0], show_only);
odb_transaction_commit(transaction);
odb_transaction_commit_and_finalize_or_die(transaction);

finish:
if (write_locked_index(repo->index, &lock_file,
Expand Down
34 changes: 13 additions & 21 deletions builtin/bundle.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,41 +68,33 @@ static int parse_options_cmd_bundle(int argc,
}

static int cmd_bundle_create(int argc, const char **argv, const char *prefix,
struct repository *repo UNUSED) {
struct strvec pack_opts = STRVEC_INIT;
struct repository *repo UNUSED)
{
int progress = isatty(STDERR_FILENO);
int version = -1;
int ret;
struct option options[] = {
OPT_PASSTHRU_ARGV('q', "quiet", &pack_opts, NULL,
N_("do not show progress meter"),
PARSE_OPT_NOARG),
OPT_PASSTHRU_ARGV(0, "progress", &pack_opts, NULL,
N_("show progress meter"),
PARSE_OPT_NOARG),
OPT_PASSTHRU_ARGV(0, "all-progress", &pack_opts, NULL,
N_("historical; same as --progress"),
PARSE_OPT_NOARG | PARSE_OPT_HIDDEN),
OPT_PASSTHRU_ARGV(0, "all-progress-implied", &pack_opts, NULL,
N_("historical; does nothing"),
PARSE_OPT_NOARG | PARSE_OPT_HIDDEN),
OPT_NEGBIT('q', "quiet", &progress,
N_("do not show progress meter"), 1),
OPT_BIT(0, "progress", &progress,
N_("show progress meter"), 1),
OPT_BIT_F(0, "all-progress", &progress,
N_("historical; same as --progress"), 1,
PARSE_OPT_HIDDEN),
OPT_NOOP_NOARG(0, "all-progress-implied"),
OPT_INTEGER(0, "version", &version,
N_("specify bundle format version")),
OPT_END()
};
char *bundle_file;

if (isatty(STDERR_FILENO))
strvec_push(&pack_opts, "--progress");
strvec_push(&pack_opts, "--all-progress-implied");
int ret;

argc = parse_options_cmd_bundle(argc, argv, prefix,
builtin_bundle_create_usage, options, &bundle_file);
/* bundle internals use argv[1] as further parameters */

if (!startup_info->have_repository)
die(_("Need a repository to create a bundle."));
ret = !!create_bundle(the_repository, bundle_file, argc, argv, &pack_opts, version);
strvec_clear(&pack_opts);
ret = !!create_bundle(the_repository, bundle_file, argc, argv, version, progress);
free(bundle_file);
return ret;
}
Expand Down
3 changes: 0 additions & 3 deletions builtin/fsck.c
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,6 @@ int cmd_fsck(int argc,
odb_for_each_object(repo->objects, NULL,
mark_object_for_connectivity, repo, 0);
} else {
odb_prepare_alternates(repo->objects);
for (source = repo->objects->sources; source; source = source->next)
fsck_source(repo, source);

Expand Down Expand Up @@ -1155,7 +1154,6 @@ int cmd_fsck(int argc,
if (repo->settings.core_commit_graph) {
struct child_process commit_graph_verify = CHILD_PROCESS_INIT;

odb_prepare_alternates(repo->objects);
for (source = repo->objects->sources; source; source = source->next) {
child_process_init(&commit_graph_verify);
commit_graph_verify.git_cmd = 1;
Expand All @@ -1173,7 +1171,6 @@ int cmd_fsck(int argc,
if (repo->settings.core_multi_pack_index) {
struct child_process midx_verify = CHILD_PROCESS_INIT;

odb_prepare_alternates(repo->objects);
for (source = repo->objects->sources; source; source = source->next) {
child_process_init(&midx_verify);
midx_verify.git_cmd = 1;
Expand Down
16 changes: 9 additions & 7 deletions builtin/pack-objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -1338,6 +1338,7 @@ static void write_pack_file(void)
uint32_t nr_remaining = nr_result;
time_t last_mtime = 0;
struct object_entry **write_order;
off_t bytes_written = 0;

if (progress > pack_to_stdout)
progress_state = start_progress(the_repository,
Expand Down Expand Up @@ -1390,6 +1391,8 @@ static void write_pack_file(void)
display_progress(progress_state, written);
}

bytes_written += hashfile_total(f) +
the_repository->hash_algo->rawsz;
if (pack_to_stdout) {
/*
* We never fsync when writing to stdout since we may
Expand Down Expand Up @@ -1511,6 +1514,8 @@ static void write_pack_file(void)
written, nr_result);
trace2_data_intmax("pack-objects", the_repository,
"write_pack_file/wrote", nr_result);
trace2_data_intmax("pack-objects", the_repository,
"write_pack_file/wrote_bytes", bytes_written);
}

static int no_try_delta(const char *path)
Expand Down Expand Up @@ -1760,7 +1765,7 @@ static int want_object_in_pack_mtime(const struct object_id *oid,
struct odb_source *source = the_repository->objects->sources->next;
for (; source; source = source->next) {
struct odb_source_files *files = odb_source_files_downcast(source);
if (!odb_source_read_object_info(&files->loose->base, oid, NULL, 0))
if (!odb_source_read_object_info(&files->loose->base, oid, NULL, 0, NULL))
return 0;
}
}
Expand All @@ -1780,14 +1785,12 @@ static int want_object_in_pack_mtime(const struct object_id *oid,
*found_offset = 0;
}

odb_prepare_alternates(the_repository->objects);

for (source = the_repository->objects->sources; source; source = source->next) {
struct odb_source_files *files = odb_source_files_downcast(source);
struct multi_pack_index *m = get_multi_pack_index(files->packed);
struct pack_entry e;

if (m && fill_midx_entry(m, oid, &e)) {
if (m && fill_midx_entry(m, oid, &e, NULL)) {
want = want_object_in_pack_one(e.p, oid, exclude, found_pack, found_offset, found_mtime);
if (want != -1)
return want;
Expand Down Expand Up @@ -4171,7 +4174,7 @@ static void add_cruft_object_entry(const struct object_id *oid, enum object_type

for (; !found && source; source = source->next) {
struct odb_source_files *files = odb_source_files_downcast(source);
if (!odb_source_read_object_info(&files->loose->base, oid, NULL, 0))
if (!odb_source_read_object_info(&files->loose->base, oid, NULL, 0, NULL))
found = 1;
}

Expand Down Expand Up @@ -4520,7 +4523,6 @@ static void add_objects_in_unpacked_packs(void)
.source_infop = &source_info,
};

odb_prepare_alternates(to_pack.repo->objects);
for (source = to_pack.repo->objects->sources; source; source = source->next) {
struct odb_source_files *files = odb_source_files_downcast(source);

Expand Down Expand Up @@ -4637,7 +4639,7 @@ static int force_object_loose(struct odb_source *source,

for (struct odb_source *s = source->odb->sources; s; s = s->next) {
struct odb_source_files *files = odb_source_files_downcast(s);
if (!odb_source_read_object_info(&files->loose->base, oid, NULL, 0))
if (!odb_source_read_object_info(&files->loose->base, oid, NULL, 0, NULL))
return 0;
}

Expand Down
Loading