Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f570bd9
refs/files: deprecate writing symrefs as symbolic links
pks-t Oct 15, 2025
057a94f
Merge branch 'tb/incremental-midx-part-3.1' into ps/remove-packfile-s…
gitster Oct 16, 2025
181acc5
object-name: convert to use `packfile_store_get_all_packs()`
pks-t Oct 9, 2025
07fbf2b
builtin/gc: convert to use `packfile_store_get_all_packs()`
pks-t Oct 9, 2025
fdebc5d
builtin/grep: simplify how we preload packs
pks-t Oct 9, 2025
5b410c8
packfile: drop `packfile_store_get_packs()`
pks-t Oct 9, 2025
86d8c62
packfile: introduce macro to iterate through packs
pks-t Oct 9, 2025
ecad863
packfile: rename `packfile_store_get_all_packs()`
pks-t Oct 9, 2025
c568fa8
completion: complete some 'git log' options
FKbelm Oct 20, 2025
fafdf23
commit-graph: add new config for changed-paths & recommend it in scalar
emilyyang-ms Oct 17, 2025
2bb3a01
bisect: fix handling of `help` and invalid subcommands
ZhongRuoyu Oct 22, 2025
45b5ae6
Merge branch 'jk/diff-from-contents-fix' into ly/diff-name-only-with-…
gitster Oct 22, 2025
0adac32
Merge branch 'jc/diff-from-contents-fix' into ly/diff-name-only-with-…
gitster Oct 23, 2025
3ed5d8b
diff: stop output garbled message in dry run mode
brandb97 Oct 19, 2025
bee1bdd
gpg-interface: do not use misdesigned strbuf_split*()
cloobTech Oct 23, 2025
2ab72a1
gpg-interface: do not use misdesigned strbuf_split*()
cloobTech Oct 23, 2025
923436e
Merge branch 'ey/commit-graph-changed-paths-config'
gitster Oct 30, 2025
48d0b65
Merge branch 'ps/symlink-symref-deprecation'
gitster Oct 30, 2025
c43d4cf
Merge branch 'ob/gpg-interface-cleanup'
gitster Oct 30, 2025
5554738
Merge branch 'ps/remove-packfile-store-get-packs'
gitster Oct 30, 2025
27a1735
Merge branch 'ly/diff-name-only-with-diff-from-content'
gitster Oct 30, 2025
ee335b9
Merge branch 'kf/log-shortlog-completion-fix'
gitster Oct 30, 2025
be414e1
Merge branch 'rz/bisect-help-unknown'
gitster Oct 30, 2025
a99f379
The 27th batch
gitster Oct 30, 2025
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
20 changes: 20 additions & 0 deletions Documentation/BreakingChanges.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,26 @@ The command will be removed.
+
cf. <xmqqa59i45wc.fsf@gitster.g>

* Support for `core.preferSymlinkRefs=true` has been deprecated and will be
removed in Git 3.0. Writing symbolic refs as symbolic links will be phased
out in favor of using plain files using the textual representation of
symbolic refs.
+
Symbolic references were initially always stored as a symbolic link. This was
changed in 9b143c6e15 (Teach update-ref about a symbolic ref stored in a
textfile., 2005-09-25), where a new textual symref format was introduced to
store those symbolic refs in a plain file. In 9f0bb90d16
(core.prefersymlinkrefs: use symlinks for .git/HEAD, 2006-05-02), the Git
project switched the default to use the textual symrefs in favor of symbolic
links.
+
The migration away from symbolic links has happened almost 20 years ago by now,
and there is no known reason why one should prefer them nowadays. Furthermore,
symbolic links are not supported on some platforms.
+
Note that only the writing side for such symbolic links is deprecated. Reading
such symbolic links is still supported for now.

== Superseded features that will not be deprecated

Some features have gained newer replacements that aim to improve the design in
Expand Down
23 changes: 23 additions & 0 deletions Documentation/RelNotes/2.52.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ UI, Workflows & Features
* "git fast-import" is taught to handle signed tags, just like it
recently learned to handle signed commits, in different ways.

* A new configuration variable commitGraph.changedPaths allows to
turn "--changed-paths" on by default for "git commit-graph".

* "Symlink symref" has been added to the list of things that will
disappear at Git 3.0 boundary.


Performance, Internal Implementation, Development Support etc.
--------------------------------------------------------------
Expand Down Expand Up @@ -149,6 +155,9 @@ Performance, Internal Implementation, Development Support etc.
* The code in "git repack" machinery has been cleaned up to prepare
for incremental update of midx files.

* Two slightly different ways to get at "all the packfiles" in API
has been cleaned up.


Fixes since v2.51
-----------------
Expand Down Expand Up @@ -359,6 +368,20 @@ including security updates, are included in this release.
fail doe to overly long pathname in our test environment, which has
been worked around by using "ssh-agent -T".

* strbuf_split*() to split a string into multiple strbufs is often a
wrong API to use. A few uses of it have been removed by
simplifying the code.
(merge 2ab72a16d9 ob/gpg-interface-cleanup later to maint).

* "git shortlog" knows "--committer" and "--author" options, which
the command line completion (in contrib/) did not handle well,
which has been corrected.
(merge c568fa8e1c kf/log-shortlog-completion-fix later to maint).

* "git bisect" command did not react correctly to "git bisect help"
and "git bisect unknown", which has been corrected.
(merge 2bb3a012f3 rz/bisect-help-unknown later to maint).

* Other code cleanup, docfix, build fix, etc.
(merge 529a60a885 ua/t1517-short-help-tests later to maint).
(merge 22d421fed9 ac/deglobal-fmt-merge-log-config later to maint).
Expand Down
11 changes: 11 additions & 0 deletions Documentation/config/commitgraph.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ commitGraph.maxNewFilters::
Specifies the default value for the `--max-new-filters` option of `git
commit-graph write` (c.f., linkgit:git-commit-graph[1]).

commitGraph.changedPaths::
If true, then `git commit-graph write` will compute and write
changed-path Bloom filters by default, equivalent to passing
`--changed-paths`. If false or unset, changed-paths Bloom filters will
be written during `git commit-graph write` only if the filters already
exist in the current commit-graph file. This matches the default
behavior of `git commit-graph write` without any `--[no-]changed-paths`
option. To rewrite a commit-graph file without any filters, use the
`--no-changed-paths` option. Command-line option `--[no-]changed-paths`
always takes precedence over this configuration. Defaults to unset.

commitGraph.readChangedPaths::
Deprecated. Equivalent to commitGraph.changedPathsVersion=-1 if true, and
commitGraph.changedPathsVersion=0 if false. (If commitGraph.changedPathVersion
Expand Down
3 changes: 3 additions & 0 deletions Documentation/config/core.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@ core.preferSymlinkRefs::
and other symbolic reference files, use symbolic links.
This is sometimes needed to work with old scripts that
expect HEAD to be a symbolic link.
+
This configuration is deprecated and will be removed in Git 3.0. Symbolic refs
will always be written as textual symrefs.

core.alternateRefsCommand::
When advertising tips of available history from an alternate, use the shell to
Expand Down
2 changes: 1 addition & 1 deletion Documentation/git-commit-graph.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ take a while on large repositories. It provides significant performance gains
for getting history of a directory or a file with `git log -- <path>`. If
this option is given, future commit-graph writes will automatically assume
that this option was intended. Use `--no-changed-paths` to stop storing this
data.
data. `--changed-paths` is implied by config `commitGraph.changedPaths=true`.
+
With the `--max-new-filters=<n>` option, generate at most `n` new Bloom
filters (if `--changed-paths` is specified). If `n` is `-1`, no limit is
Expand Down
6 changes: 5 additions & 1 deletion builtin/bisect.c
Original file line number Diff line number Diff line change
Expand Up @@ -1453,9 +1453,13 @@ int cmd_bisect(int argc,
if (!argc)
usage_msg_opt(_("need a command"), git_bisect_usage, options);

if (!strcmp(argv[0], "help"))
usage_with_options(git_bisect_usage, options);

set_terms(&terms, "bad", "good");
get_terms(&terms);
if (check_and_set_terms(&terms, argv[0]))
if (check_and_set_terms(&terms, argv[0]) ||
!one_of(argv[0], terms.term_good, terms.term_bad, NULL))
usage_msg_optf(_("unknown command: '%s'"), git_bisect_usage,
options, argv[0]);
res = bisect_state(&terms, argc, argv);
Expand Down
3 changes: 1 addition & 2 deletions builtin/cat-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,10 +852,9 @@ static void batch_each_object(struct batch_options *opt,

if (bitmap && !for_each_bitmapped_object(bitmap, &opt->objects_filter,
batch_one_object_bitmapped, &payload)) {
struct packfile_store *packs = the_repository->objects->packfiles;
struct packed_git *pack;

for (pack = packfile_store_get_all_packs(packs); pack; pack = pack->next) {
repo_for_each_pack(the_repository, pack) {
if (bitmap_index_contains_pack(bitmap, pack) ||
open_pack_index(pack))
continue;
Expand Down
2 changes: 2 additions & 0 deletions builtin/commit-graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ static int git_commit_graph_write_config(const char *var, const char *value,
{
if (!strcmp(var, "commitgraph.maxnewfilters"))
write_opts.max_new_filters = git_config_int(var, value, ctx->kvi);
else if (!strcmp(var, "commitgraph.changedpaths"))
opts.enable_changed_paths = git_config_bool(var, value) ? 1 : -1;
/*
* No need to fall-back to 'git_default_config', since this was already
* called in 'cmd_commit_graph()'.
Expand Down
3 changes: 1 addition & 2 deletions builtin/count-objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,14 @@ int cmd_count_objects(int argc,
count_loose, count_cruft, NULL, NULL);

if (verbose) {
struct packfile_store *packs = the_repository->objects->packfiles;
struct packed_git *p;
unsigned long num_pack = 0;
off_t size_pack = 0;
struct strbuf loose_buf = STRBUF_INIT;
struct strbuf pack_buf = STRBUF_INIT;
struct strbuf garbage_buf = STRBUF_INIT;

for (p = packfile_store_get_all_packs(packs); p; p = p->next) {
repo_for_each_pack(the_repository, p) {
if (!p->pack_local)
continue;
if (open_pack_index(p))
Expand Down
4 changes: 2 additions & 2 deletions builtin/fast-import.c
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ static int store_object(
if (e->idx.offset) {
duplicate_count_by_type[type]++;
return 1;
} else if (find_oid_pack(&oid, packfile_store_get_all_packs(packs))) {
} else if (find_oid_pack(&oid, packfile_store_get_packs(packs))) {
e->type = type;
e->pack_id = MAX_PACK_ID;
e->idx.offset = 1; /* just not zero! */
Expand Down Expand Up @@ -1180,7 +1180,7 @@ static void stream_blob(uintmax_t len, struct object_id *oidout, uintmax_t mark)
duplicate_count_by_type[OBJ_BLOB]++;
truncate_pack(&checkpoint);

} else if (find_oid_pack(&oid, packfile_store_get_all_packs(packs))) {
} else if (find_oid_pack(&oid, packfile_store_get_packs(packs))) {
e->type = OBJ_BLOB;
e->pack_id = MAX_PACK_ID;
e->idx.offset = 1; /* just not zero! */
Expand Down
15 changes: 6 additions & 9 deletions builtin/fsck.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,20 +867,20 @@ static int mark_packed_for_connectivity(const struct object_id *oid,

static int check_pack_rev_indexes(struct repository *r, int show_progress)
{
struct packfile_store *packs = r->objects->packfiles;
struct progress *progress = NULL;
struct packed_git *p;
uint32_t pack_count = 0;
int res = 0;

if (show_progress) {
for (struct packed_git *p = packfile_store_get_all_packs(packs); p; p = p->next)
repo_for_each_pack(r, p)
pack_count++;
progress = start_delayed_progress(the_repository,
"Verifying reverse pack-indexes", pack_count);
pack_count = 0;
}

for (struct packed_git *p = packfile_store_get_all_packs(packs); p; p = p->next) {
repo_for_each_pack(r, p) {
int load_error = load_pack_revindex_from_disk(p);

if (load_error < 0) {
Expand Down Expand Up @@ -1000,8 +1000,6 @@ int cmd_fsck(int argc,
for_each_packed_object(the_repository,
mark_packed_for_connectivity, NULL, 0);
} else {
struct packfile_store *packs = the_repository->objects->packfiles;

odb_prepare_alternates(the_repository->objects);
for (source = the_repository->objects->sources; source; source = source->next)
fsck_source(source);
Expand All @@ -1012,8 +1010,7 @@ int cmd_fsck(int argc,
struct progress *progress = NULL;

if (show_progress) {
for (p = packfile_store_get_all_packs(packs); p;
p = p->next) {
repo_for_each_pack(the_repository, p) {
if (open_pack_index(p))
continue;
total += p->num_objects;
Expand All @@ -1022,8 +1019,8 @@ int cmd_fsck(int argc,
progress = start_progress(the_repository,
_("Checking objects"), total);
}
for (p = packfile_store_get_all_packs(packs); p;
p = p->next) {

repo_for_each_pack(the_repository, p) {
/* verify gives error messages itself */
if (verify_pack(the_repository,
p, fsck_obj_buffer,
Expand Down
16 changes: 7 additions & 9 deletions builtin/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,10 +487,9 @@ static int too_many_loose_objects(struct gc_config *cfg)
static struct packed_git *find_base_packs(struct string_list *packs,
unsigned long limit)
{
struct packfile_store *packfiles = the_repository->objects->packfiles;
struct packed_git *p, *base = NULL;

for (p = packfile_store_get_all_packs(packfiles); p; p = p->next) {
repo_for_each_pack(the_repository, p) {
if (!p->pack_local || p->is_cruft)
continue;
if (limit) {
Expand All @@ -509,14 +508,13 @@ static struct packed_git *find_base_packs(struct string_list *packs,

static int too_many_packs(struct gc_config *cfg)
{
struct packfile_store *packs = the_repository->objects->packfiles;
struct packed_git *p;
int cnt;
int cnt = 0;

if (cfg->gc_auto_pack_limit <= 0)
return 0;

for (cnt = 0, p = packfile_store_get_all_packs(packs); p; p = p->next) {
repo_for_each_pack(the_repository, p) {
if (!p->pack_local)
continue;
if (p->pack_keep)
Expand Down Expand Up @@ -1425,9 +1423,9 @@ static int incremental_repack_auto_condition(struct gc_config *cfg UNUSED)
if (incremental_repack_auto_limit < 0)
return 1;

for (p = packfile_store_get_packs(the_repository->objects->packfiles);
count < incremental_repack_auto_limit && p;
p = p->next) {
repo_for_each_pack(the_repository, p) {
if (count >= incremental_repack_auto_limit)
break;
if (!p->multi_pack_index)
count++;
}
Expand Down Expand Up @@ -1494,7 +1492,7 @@ static off_t get_auto_pack_size(void)
struct repository *r = the_repository;

odb_reprepare(r->objects);
for (p = packfile_store_get_all_packs(r->objects->packfiles); p; p = p->next) {
repo_for_each_pack(r, p) {
if (p->pack_size > max_size) {
second_largest_size = max_size;
max_size = p->pack_size;
Expand Down
2 changes: 1 addition & 1 deletion builtin/grep.c
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ int cmd_grep(int argc,
if (recurse_submodules)
repo_read_gitmodules(the_repository, 1);
if (startup_info->have_repository)
(void)packfile_store_get_packs(the_repository->objects->packfiles);
packfile_store_prepare(the_repository->objects->packfiles);

start_threads(&opt);
} else {
Expand Down
Loading