diff options
| author | Patrick Steinhardt <ps@pks.im> | 2026-01-15 10:35:34 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-01-15 05:32:31 -0800 |
| commit | 9f18d089c51fba2776fe1fece877a359c47417f7 (patch) | |
| tree | e51d5ec9b79ebda7f0b928d7c71f4d36adad4a81 /shallow.c | |
| parent | a468f3cefab32eed7d9a12bd6b93719d38ec67a6 (diff) | |
| download | git-9f18d089c51fba2776fe1fece877a359c47417f7.tar.xz | |
commit: rename `free_commit_list()` to conform to coding guidelines
Our coding guidelines say that:
Functions that operate on `struct S` are named `S_<verb>()` and should
generally receive a pointer to `struct S` as first parameter.
While most of the functions related to `struct commit_list` already
follow that naming schema, `free_commit_list()` doesn't.
Rename the function to address this and adjust all of its callers. Add a
compatibility wrapper for the old function name to ease the transition
and avoid any semantic conflicts with in-flight patch series. This
wrapper will be removed once Git 2.53 has been released.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'shallow.c')
| -rw-r--r-- | shallow.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -40,7 +40,7 @@ int register_shallow(struct repository *r, const struct object_id *oid) oidcpy(&graft->oid, oid); graft->nr_parent = -1; if (commit && commit->object.parsed) { - free_commit_list(commit->parents); + commit_list_free(commit->parents); commit->parents = NULL; } return register_commit_graft(r, graft, 0); @@ -267,7 +267,7 @@ struct commit_list *get_shallow_commits_by_rev_list(struct strvec *argv, break; } } - free_commit_list(not_shallow_list); + commit_list_free(not_shallow_list); /* * Now we can clean up NOT_SHALLOW on border commits. Having |
