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 /builtin/pull.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 'builtin/pull.c')
| -rw-r--r-- | builtin/pull.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/pull.c b/builtin/pull.c index 3ff748e0b3..6ad420ce6f 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -704,14 +704,14 @@ static int get_octopus_merge_base(struct object_id *merge_base, if (get_octopus_merge_bases(revs, &result) < 0) exit(128); - free_commit_list(revs); + commit_list_free(revs); reduce_heads_replace(&result); if (!result) return 1; oidcpy(merge_base, &result->item->object.oid); - free_commit_list(result); + commit_list_free(result); return 0; } @@ -803,7 +803,7 @@ static int get_can_ff(struct object_id *orig_head, commit_list_insert(head, &list); merge_head = lookup_commit_reference(the_repository, orig_merge_head); ret = repo_is_descendant_of(the_repository, merge_head, list); - free_commit_list(list); + commit_list_free(list); if (ret < 0) exit(128); return ret; @@ -828,7 +828,7 @@ static int already_up_to_date(struct object_id *orig_head, theirs = lookup_commit_reference(the_repository, &merge_heads->oid[i]); commit_list_insert(theirs, &list); ok = repo_is_descendant_of(the_repository, ours, list); - free_commit_list(list); + commit_list_free(list); if (ok < 0) exit(128); if (!ok) |
