Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
ff9fb2c
commit: rename `copy_commit_list()` to conform to coding guidelines
pks-t Jan 15, 2026
a468f3c
commit: rename `reverse_commit_list()` to conform to coding guidelines
pks-t Jan 15, 2026
9f18d08
commit: rename `free_commit_list()` to conform to coding guidelines
pks-t Jan 15, 2026
85329e3
last-modified: rewrite error message when more than one commit given
To1ne Jan 30, 2026
e2505ec
last-modified: fix memory leak when more than one commit is given
To1ne Jan 30, 2026
b768485
last-modified: remove double error message
To1ne Jan 30, 2026
525ef52
last-modified: verify revision argument is a commit-ish
To1ne Jan 30, 2026
585e8df
odb: store ODB source in `struct odb_transaction`
jltobler Feb 3, 2026
8bf06d0
object-file: rename transaction functions
jltobler Feb 3, 2026
fa7d067
odb: prepare `struct odb_transaction` to become generic
jltobler Feb 3, 2026
3f67e3d
odb: transparently handle common transaction behavior
jltobler Feb 3, 2026
6061483
cocci: extend MEMZERO_ARRAY() rules
To1ne Feb 3, 2026
0728012
diff-highlight: allow testing with Git 3.0 breaking changes
gitster Feb 3, 2026
486386c
contrib/subtree: fix tests with reftable backend
Feb 4, 2026
3c6162e
test: optionally test contrib in CI
gitster Feb 2, 2026
831989e
doc: send-email: correct --no-signed-off-by-cc misspelling
mcepl Feb 5, 2026
4ac4705
global: constify some pointers that are not written to
collinfunk Feb 6, 2026
fc9fd80
gpg-interface: remove an unnecessary NULL initialization
collinfunk Feb 6, 2026
c44b3f3
doc: fix repo_config documentation reference
SoutrikDas Feb 6, 2026
ba447e9
merge-ours: drop USE_THE_REPOSITORY_VARIABLE
sambostock Feb 6, 2026
fb1b786
merge-ours: integrate with sparse-index
sambostock Feb 6, 2026
c591c3c
ci: ubuntu: use GNU coreutils for dirname
Feb 7, 2026
b852412
Merge branch 'tc/memzero-array'
gitster Feb 13, 2026
448a65c
Merge branch 'cs/subtree-reftable-testfix'
gitster Feb 13, 2026
a91de21
Merge branch 'jc/diff-highlight-main-master-testfix'
gitster Feb 13, 2026
7855eff
Merge branch 'cf/c23-const-preserving-strchr-updates-0'
gitster Feb 13, 2026
f036245
Merge branch 'mc/doc-send-email-signed-off-by-cc'
gitster Feb 13, 2026
70cc3bc
Merge branch 'tc/last-modified-not-a-tree'
gitster Feb 13, 2026
5288202
Merge branch 'ps/commit-list-functions-renamed'
gitster Feb 13, 2026
29722ee
Merge branch 'jt/odb-transaction-per-source'
gitster Feb 13, 2026
e10d5fc
Merge branch 'jc/ci-test-contrib-too'
gitster Feb 13, 2026
94336d7
Merge branch 'sd/doc-my1c-api-config-reference-fix'
gitster Feb 13, 2026
03dfe4e
Merge branch 'sb/merge-ours-sparse'
gitster Feb 13, 2026
852829b
The 4th batch
gitster Feb 13, 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
2 changes: 1 addition & 1 deletion Documentation/MyFirstContribution.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ function body:
apply standard precedence rules. `repo_config_get_string_tmp()` will look up
a specific key ("user.name") and give you the value. There are a number of
single-key lookup functions like this one; you can see them all (and more info
about how to use `repo_config()`) in `Documentation/technical/api-config.adoc`.
about how to use `repo_config()`) in `config.h`.

You should see that the name printed matches the one you see when you run:

Expand Down
35 changes: 35 additions & 0 deletions Documentation/RelNotes/2.54.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,26 @@ Performance, Internal Implementation, Development Support etc.

* Improve set-up time of a perf test.

* ISO C23 redefines strchr and friends that tradiotionally took
a const pointer and returned a non-const pointer derived from it to
preserve constness (i.e., if you ask for a substring in a const
string, you get a const pointer to the substring). Update code
paths that used non-const pointer to receive their results that did
not have to be non-const to adjust.
(merge fc9fd8065c cf/c23-const-preserving-strchr-updates-0 later to maint).

* Rename three functions around the commit_list data structure.
(merge 9f18d089c5 ps/commit-list-functions-renamed later to maint).

* Transaction to create objects (or not) is currently tied to the
repository, but in the future a repository can have multiple object
sources, which may have different transaction mechanisms. Make the
odb transaction API per object source.
(merge 3f67e3d021 jt/odb-transaction-per-source later to maint).

* "git merge-ours" is taught to work better in a sparse checkout.
(merge fb1b786ebf sb/merge-ours-sparse later to maint).


Fixes since v2.53
-----------------
Expand All @@ -59,6 +79,17 @@ Fixes since v2.53
gets blamed for.
(merge d519082d4e rs/blame-ignore-colors-fix later to maint).

* Coccinelle rules update.
(merge 60614838a4 tc/memzero-array later to maint).

* Giving "git last-modified" a tree (not a commit-ish) died an
uncontrolled death, which has been corrected.
(merge 525ef52301 tc/last-modified-not-a-tree later to maint).

* Test contrib/ things in CI to catch breakages before they enter the
"next" branch.
(merge c591c3ceff jc/ci-test-contrib-too later to maint).

* Other code cleanup, docfix, build fix, etc.
(merge d79fff4a11 jk/remote-tracking-ref-leakfix later to maint).
(merge 7a747f972d dd/t5403-modernise later to maint).
Expand All @@ -68,3 +99,7 @@ Fixes since v2.53
(merge df1c5d7ed7 kh/doc-shortlog-fix later to maint).
(merge 2d45507f15 am/doc-github-contributiong-link-to-submittingpatches later to maint).
(merge 68060b9262 hs/t9160-test-paths later to maint).
(merge 486386c687 cs/subtree-reftable-testfix later to maint).
(merge 0728012c53 jc/diff-highlight-main-master-testfix later to maint).
(merge 831989ef38 mc/doc-send-email-signed-off-by-cc later to maint).
(merge c44b3f3203 sd/doc-my1c-api-config-reference-fix later to maint).
2 changes: 1 addition & 1 deletion Documentation/git-send-email.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ Automating
+
Default is the value of `sendemail.suppressCc` configuration value; if
that is unspecified, default to `self` if `--suppress-from` is
specified, as well as `body` if `--no-signed-off-cc` is specified.
specified, as well as `body` if `--no-signed-off-by-cc` is specified.

--suppress-from::
--no-suppress-from::
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,9 @@ include shared.mak
# If it isn't set, fallback to $LC_ALL, $LANG or use the first utf-8
# locale returned by "locale -a".
#
# Define TEST_CONTRIB_TOO to make "make test" run tests in contrib/
# directories.
#
# Define HAVE_CLOCK_GETTIME if your platform has clock_gettime.
#
# Define HAVE_CLOCK_MONOTONIC if your platform has CLOCK_MONOTONIC.
Expand Down Expand Up @@ -3371,6 +3374,9 @@ export TEST_NO_MALLOC_CHECK

test: all
$(MAKE) -C t/ all
ifdef TEST_CONTRIB_TOO
$(MAKE) -C contrib/ test
endif

perf: all
$(MAKE) -C t/perf/ all
Expand Down
2 changes: 1 addition & 1 deletion add-patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ static int parse_hunk_header(struct add_p_state *s, struct hunk *hunk)
{
struct hunk_header *header = &hunk->header;
const char *line = s->plain.buf + hunk->start, *p = line;
char *eol = memchr(p, '\n', s->plain.len - hunk->start);
const char *eol = memchr(p, '\n', s->plain.len - hunk->start);

if (!eol)
eol = s->plain.buf + s->plain.len;
Expand Down
2 changes: 1 addition & 1 deletion apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -4144,7 +4144,7 @@ static int preimage_oid_in_gitlink_patch(struct patch *p, struct object_id *oid)
*/
struct fragment *hunk = p->fragments;
static const char heading[] = "-Subproject commit ";
char *preimage;
const char *preimage;

if (/* does the patch have only one hunk? */
hunk && !hunk->next &&
Expand Down
12 changes: 6 additions & 6 deletions bisect.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ static struct commit_list *best_bisection_sorted(struct commit_list *list, int n
p = p->next;
}
if (p) {
free_commit_list(p->next);
commit_list_free(p->next);
p->next = NULL;
}
strbuf_release(&buf);
Expand Down Expand Up @@ -438,7 +438,7 @@ void find_bisection(struct commit_list **commit_list, int *reaches,
if (best) {
if (!(bisect_flags & FIND_BISECTION_ALL)) {
list->item = best->item;
free_commit_list(list->next);
commit_list_free(list->next);
best = list;
best->next = NULL;
}
Expand Down Expand Up @@ -559,8 +559,8 @@ struct commit_list *filter_skipped(struct commit_list *list,
} else {
if (!show_all) {
if (!skipped_first || !*skipped_first) {
free_commit_list(next);
free_commit_list(filtered);
commit_list_free(next);
commit_list_free(filtered);
return list;
}
} else if (skipped_first && !*skipped_first) {
Expand Down Expand Up @@ -879,7 +879,7 @@ static enum bisect_error check_merge_bases(size_t rev_nr, struct commit **rev, i
}
}

free_commit_list(result);
commit_list_free(result);
return res;
}

Expand Down Expand Up @@ -1142,7 +1142,7 @@ enum bisect_error bisect_next_all(struct repository *r, const char *prefix)

res = bisect_checkout(bisect_rev, no_checkout);
cleanup:
free_commit_list(tried);
commit_list_free(tried);
release_revisions(&revs);
strvec_clear(&rev_argv);
return res;
Expand Down
2 changes: 1 addition & 1 deletion blame.c
Original file line number Diff line number Diff line change
Expand Up @@ -2368,7 +2368,7 @@ static struct commit_list *first_scapegoat(struct rev_info *revs, struct commit
if (revs->first_parent_only &&
commit->parents &&
commit->parents->next) {
free_commit_list(commit->parents->next);
commit_list_free(commit->parents->next);
commit->parents->next = NULL;
}
return commit->parents;
Expand Down
2 changes: 1 addition & 1 deletion builtin/am.c
Original file line number Diff line number Diff line change
Expand Up @@ -1726,7 +1726,7 @@ static void do_commit(const struct am_state *state)

run_hooks(the_repository, "post-applypatch");

free_commit_list(parents);
commit_list_free(parents);
strbuf_release(&sb);
}

Expand Down
2 changes: 1 addition & 1 deletion builtin/commit-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ int cmd_commit_tree(int argc,
ret = 0;

out:
free_commit_list(parents);
commit_list_free(parents);
strbuf_release(&buffer);
return ret;
}
6 changes: 3 additions & 3 deletions builtin/commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
logfile);
hook_arg1 = "message";
} else if (use_message) {
char *buffer;
const char *buffer;
buffer = strstr(use_message_buffer, "\n\n");
if (buffer)
strbuf_addstr(&sb, skip_blank_lines(buffer + 2));
Expand Down Expand Up @@ -1850,7 +1850,7 @@ int cmd_commit(int argc,
} else if (amend) {
if (!reflog_msg)
reflog_msg = "commit (amend)";
parents = copy_commit_list(current_head->parents);
parents = commit_list_copy(current_head->parents);
} else if (whence == FROM_MERGE) {
struct strbuf m = STRBUF_INIT;
FILE *fp;
Expand Down Expand Up @@ -1979,7 +1979,7 @@ int cmd_commit(int argc,

cleanup:
free_commit_extra_headers(extra);
free_commit_list(parents);
commit_list_free(parents);
strbuf_release(&author_ident);
strbuf_release(&err);
strbuf_release(&sb);
Expand Down
2 changes: 1 addition & 1 deletion builtin/describe.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ static void process_object(struct object *obj, const char *path, void *data)
describe_commit(pcd->current_commit, pcd->dst);
strbuf_addf(pcd->dst, ":%s", path);
}
free_commit_list(pcd->revs->commits);
commit_list_free(pcd->revs->commits);
pcd->revs->commits = NULL;
}
}
Expand Down
2 changes: 1 addition & 1 deletion builtin/diff-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static int stdin_diff_commit(struct commit *commit, const char *p)
struct commit *parent = lookup_commit(the_repository, &oid);
if (!pptr) {
/* Free the real parent list */
free_commit_list(commit->parents);
commit_list_free(commit->parents);
commit->parents = NULL;
pptr = &(commit->parents);
}
Expand Down
2 changes: 1 addition & 1 deletion builtin/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ static int dfs_on_ref(const struct reference *ref, void *cb_data)
}
}

free_commit_list(stack);
commit_list_free(stack);
return result;
}

Expand Down
19 changes: 14 additions & 5 deletions builtin/last-modified.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ static void add_path_from_diff(struct diff_queue_struct *q,

static int populate_paths_from_revs(struct last_modified *lm)
{
int num_interesting = 0;
int num_interesting = 0, ret = 0;
struct diff_options diffopt;

/*
Expand All @@ -146,16 +146,25 @@ static int populate_paths_from_revs(struct last_modified *lm)
if (obj->item->flags & UNINTERESTING)
continue;

if (num_interesting++)
return error(_("last-modified can only operate on one tree at a time"));
if (num_interesting++) {
ret = error(_("last-modified can only operate on one commit at a time"));
goto out;
}

if (!repo_peel_to_type(lm->rev.repo, obj->path, 0, obj->item, OBJ_COMMIT)) {
ret = error(_("revision argument '%s' is a %s, not a commit-ish"), obj->name, type_name(obj->item->type));
goto out;
}

diff_tree_oid(lm->rev.repo->hash_algo->empty_tree,
&obj->item->oid, "", &diffopt);
diff_flush(&diffopt);
}

out:
clear_pathspec(&diffopt.pathspec);

return 0;
return ret;
}

static void last_modified_emit(struct last_modified *lm,
Expand Down Expand Up @@ -494,7 +503,7 @@ static int last_modified_init(struct last_modified *lm, struct repository *r,
lm->rev.bloom_filter_settings = get_bloom_filter_settings(lm->rev.repo);

if (populate_paths_from_revs(lm) < 0)
return error(_("unable to setup last-modified"));
return -1;

CALLOC_ARRAY(lm->all_paths, hashmap_get_size(&lm->paths));
lm->all_paths_nr = 0;
Expand Down
12 changes: 6 additions & 6 deletions builtin/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ static int cmd_log_walk_no_free(struct rev_info *rev)
*/
free_commit_buffer(the_repository->parsed_objects,
commit);
free_commit_list(commit->parents);
commit_list_free(commit->parents);
commit->parents = NULL;
}
if (saved_nrl < rev->diffopt.needed_rename_limit)
Expand Down Expand Up @@ -1697,12 +1697,12 @@ static struct commit *get_base_commit(const struct format_config *cfg,
if (die_on_failure) {
die(_("could not find exact merge base"));
} else {
free_commit_list(base_list);
commit_list_free(base_list);
return NULL;
}
}
base = base_list->item;
free_commit_list(base_list);
commit_list_free(base_list);
} else {
if (die_on_failure)
die(_("failed to get upstream, if you want to record base commit automatically,\n"
Expand Down Expand Up @@ -1732,14 +1732,14 @@ static struct commit *get_base_commit(const struct format_config *cfg,
if (die_on_failure) {
die(_("failed to find exact merge base"));
} else {
free_commit_list(merge_base);
commit_list_free(merge_base);
free(rev);
return NULL;
}
}

rev[i] = merge_base->item;
free_commit_list(merge_base);
commit_list_free(merge_base);
}

if (rev_nr % 2)
Expand Down Expand Up @@ -2610,7 +2610,7 @@ int cmd_cherry(int argc,
print_commit(sign, commit, verbose, abbrev, revs.diffopt.file);
}

free_commit_list(list);
commit_list_free(list);
free_patch_ids(&ids);
return 0;
}
14 changes: 7 additions & 7 deletions builtin/merge-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ static int show_merge_base(struct commit **rev, size_t rev_nr, int show_all)

if (repo_get_merge_bases_many_dirty(the_repository, rev[0],
rev_nr - 1, rev + 1, &result) < 0) {
free_commit_list(result);
commit_list_free(result);
return -1;
}

Expand All @@ -28,7 +28,7 @@ static int show_merge_base(struct commit **rev, size_t rev_nr, int show_all)
break;
}

free_commit_list(result);
commit_list_free(result);
return 0;
}

Expand Down Expand Up @@ -71,7 +71,7 @@ static int handle_independent(int count, const char **args)
for (rev = revs; rev; rev = rev->next)
printf("%s\n", oid_to_hex(&rev->item->object.oid));

free_commit_list(revs);
commit_list_free(revs);
return 0;
}

Expand All @@ -85,11 +85,11 @@ static int handle_octopus(int count, const char **args, int show_all)
commit_list_insert(get_commit_reference(args[i]), &revs);

if (get_octopus_merge_bases(revs, &result) < 0) {
free_commit_list(revs);
free_commit_list(result);
commit_list_free(revs);
commit_list_free(result);
return 128;
}
free_commit_list(revs);
commit_list_free(revs);
reduce_heads_replace(&result);

if (!result)
Expand All @@ -101,7 +101,7 @@ static int handle_octopus(int count, const char **args, int show_all)
break;
}

free_commit_list(result);
commit_list_free(result);
return 0;
}

Expand Down
Loading