aboutsummaryrefslogtreecommitdiffstats
path: root/trailer.h
diff options
context:
space:
mode:
authorLinus Arver <linusa@google.com>2024-03-01 00:14:40 +0000
committerJunio C Hamano <gitster@pobox.com>2024-03-01 10:35:42 -0800
commit7b1c6aa541cc94796e9148e5e49c4d2f787e953d (patch)
tree4f4b5ebee29a30d4f272dc7e9b2bd166e99b01d3 /trailer.h
parenta082e2893868be819b5486e9af3e390a7c948ee2 (diff)
downloadgit-7b1c6aa541cc94796e9148e5e49c4d2f787e953d.tar.gz
trailer: rename functions to use 'trailer'
Rename process_trailers() to interpret_trailers(), because it matches the name for the builtin command of the same name (git-interpret-trailers), which is the sole user of process_trailers(). In a following commit, we will move "interpret_trailers" from trailer.c to builtin/interpret-trailers.c. That move will necessitate the growth of the trailer.h API, forcing us to expose some additional functions in trailer.h. Rename relevant functions so that they include the term "trailer" in their name, so that clients of the API will be able to easily identify them by their "trailer" moniker, just like all the other functions already exposed by trailer.h. Rename `struct list_head *head` to `struct list_head *trailers` because "head" conveys no additional information beyond the "list_head" type. Reorder parameters for format_trailers_from_commit() to prefer const struct process_trailer_options *opts as the first parameter, because these options are intimately tied to formatting trailers. Parameters like `FILE *outfile` should be last because they are a kind of 'out' parameter, so put such parameters at the end. This will be the pattern going forward in this series. Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Linus Arver <linusa@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'trailer.h')
-rw-r--r--trailer.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/trailer.h b/trailer.h
index 1644cd05f6..37033e631a 100644
--- a/trailer.h
+++ b/trailer.h
@@ -81,9 +81,9 @@ struct process_trailer_options {
#define PROCESS_TRAILER_OPTIONS_INIT {0}
-void process_trailers(const char *file,
- const struct process_trailer_options *opts,
- struct list_head *new_trailer_head);
+void interpret_trailers(const struct process_trailer_options *opts,
+ struct list_head *new_trailer_head,
+ const char *file);
void trailer_info_get(struct trailer_info *info, const char *str,
const struct process_trailer_options *opts);