aboutsummaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-02-13 13:39:25 -0800
committerJunio C Hamano <gitster@pobox.com>2026-02-13 13:39:25 -0800
commit528820243334c55e015047477e720a14bc9cf25f (patch)
tree773eaf04a82524688f5fb95c3c7d0453720d192b /commit.h
parent70cc3bca87abdfbc941e98d1c0d3199f758f0990 (diff)
parent9f18d089c51fba2776fe1fece877a359c47417f7 (diff)
downloadgit-528820243334c55e015047477e720a14bc9cf25f.tar.xz
Merge branch 'ps/commit-list-functions-renamed'
Rename three functions around the commit_list data structure. * ps/commit-list-functions-renamed: commit: rename `free_commit_list()` to conform to coding guidelines commit: rename `reverse_commit_list()` to conform to coding guidelines commit: rename `copy_commit_list()` to conform to coding guidelines
Diffstat (limited to 'commit.h')
-rw-r--r--commit.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/commit.h b/commit.h
index 79a761c37d..1635de418b 100644
--- a/commit.h
+++ b/commit.h
@@ -186,12 +186,31 @@ struct commit_list *commit_list_insert_by_date(struct commit *item,
void commit_list_sort_by_date(struct commit_list **list);
/* Shallow copy of the input list */
-struct commit_list *copy_commit_list(const struct commit_list *list);
+struct commit_list *commit_list_copy(const struct commit_list *list);
/* Modify list in-place to reverse it, returning new head; list will be tail */
-struct commit_list *reverse_commit_list(struct commit_list *list);
+struct commit_list *commit_list_reverse(struct commit_list *list);
-void free_commit_list(struct commit_list *list);
+void commit_list_free(struct commit_list *list);
+
+/*
+ * Deprecated compatibility functions for `struct commit_list`, to be removed
+ * once Git 2.53 is released.
+ */
+static inline struct commit_list *copy_commit_list(struct commit_list *l)
+{
+ return commit_list_copy(l);
+}
+
+static inline struct commit_list *reverse_commit_list(struct commit_list *l)
+{
+ return commit_list_reverse(l);
+}
+
+static inline void free_commit_list(struct commit_list *l)
+{
+ commit_list_free(l);
+}
struct rev_info; /* in revision.h, it circularly uses enum cmit_fmt */