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 /object-name.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 'object-name.c')
| -rw-r--r-- | object-name.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/object-name.c b/object-name.c index 8b862c124e..e697566423 100644 --- a/object-name.c +++ b/object-name.c @@ -1281,7 +1281,7 @@ static int peel_onion(struct repository *r, const char *name, int len, commit_list_insert((struct commit *)o, &list); ret = get_oid_oneline(r, prefix, oid, list); - free_commit_list(list); + commit_list_free(list); free(prefix); return ret; } @@ -1623,7 +1623,7 @@ int repo_get_oid_mb(struct repository *r, if (!two) return -1; if (repo_get_merge_bases(r, one, two, &mbs) < 0) { - free_commit_list(mbs); + commit_list_free(mbs); return -1; } if (!mbs || mbs->next) @@ -1632,7 +1632,7 @@ int repo_get_oid_mb(struct repository *r, st = 0; oidcpy(oid, &mbs->item->object.oid); } - free_commit_list(mbs); + commit_list_free(mbs); return st; } @@ -2052,7 +2052,7 @@ static enum get_oid_result get_oid_with_context_1(struct repository *repo, refs_head_ref(get_main_ref_store(repo), handle_one_ref, &cb); ret = get_oid_oneline(repo, name + 2, oid, list); - free_commit_list(list); + commit_list_free(list); return ret; } if (namelen < 3 || |
