summaryrefslogtreecommitdiff
path: root/pretty.h
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-03-01 14:02:57 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-03-01 14:02:58 -0800
commit28714238c8d482345ca17e8dd98d8cc328de24a8 (patch)
tree9e6d014a41e4298f4bb8793f1a51f906e44d4728 /pretty.h
parentMerge branch 'hn/reftable-tables-doc-update' (diff)
parentref-filter: use pretty.c logic for trailers (diff)
downloadtgif-28714238c8d482345ca17e8dd98d8cc328de24a8.tar.xz
Merge branch 'hv/trailer-formatting'
The logic to handle "trailer" related placeholders in the "--format=" mechanisms in the "log" family and "for-each-ref" family is getting unified. * hv/trailer-formatting: ref-filter: use pretty.c logic for trailers pretty.c: capture invalid trailer argument pretty.c: refactor trailer logic to `format_set_trailers_options()` t6300: use function to test trailer options
Diffstat (limited to 'pretty.h')
-rw-r--r--pretty.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/pretty.h b/pretty.h
index 7ce6c0b437..d902cdd70a 100644
--- a/pretty.h
+++ b/pretty.h
@@ -6,6 +6,7 @@
struct commit;
struct strbuf;
+struct process_trailer_options;
/* Commit formats */
enum cmit_fmt {
@@ -142,4 +143,15 @@ int commit_format_is_empty(enum cmit_fmt);
/* Make subject of commit message suitable for filename */
void format_sanitized_subject(struct strbuf *sb, const char *msg, size_t len);
+/*
+ * Set values of fields in "struct process_trailer_options"
+ * according to trailers arguments.
+ */
+int format_set_trailers_options(struct process_trailer_options *opts,
+ struct string_list *filter_list,
+ struct strbuf *sepbuf,
+ struct strbuf *kvsepbuf,
+ const char **arg,
+ char **invalid_arg);
+
#endif /* PRETTY_H */