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 /bisect.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 'bisect.c')
| -rw-r--r-- | bisect.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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); @@ -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; } @@ -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) { @@ -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; } @@ -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; |
