diff options
| author | Patrick Steinhardt <ps@pks.im> | 2026-01-15 10:35:32 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-01-15 05:32:31 -0800 |
| commit | ff9fb2cfe6efb26b9d25dc5c114ab56126f9003e (patch) | |
| tree | be0759c59f6305d03d548da441896a78ab93aff1 /builtin/commit.c | |
| parent | 8745eae506f700657882b9e32b2aa00f234a6fb6 (diff) | |
| download | git-ff9fb2cfe6efb26b9d25dc5c114ab56126f9003e.tar.xz | |
commit: rename `copy_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, `copy_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/commit.c')
| -rw-r--r-- | builtin/commit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/commit.c b/builtin/commit.c index 0243f17d53..0aa3690b04 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -1849,7 +1849,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; |
