summaryrefslogtreecommitdiff
path: root/trailer.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2017-08-01 09:03:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-08-14 19:23:28 (GMT)
commit51166b8754e0df4ed3ee559ddcc4641035ec98ec (patch)
treeb4cc6bdc37081358f6ccdf501394a44df52ec943 /trailer.h
parent52fc319d4dfdbf67fe298908d8519be271ca4eb4 (diff)
downloadgit-51166b8754e0df4ed3ee559ddcc4641035ec98ec.zip
git-51166b8754e0df4ed3ee559ddcc4641035ec98ec.tar.gz
git-51166b8754e0df4ed3ee559ddcc4641035ec98ec.tar.bz2
trailers: introduce struct new_trailer_item
This will provide a place to store the current state of the --where, --if-exists and --if-missing options. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'trailer.h')
-rw-r--r--trailer.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/trailer.h b/trailer.h
index 2b39a1b..b83b249 100644
--- a/trailer.h
+++ b/trailer.h
@@ -1,6 +1,8 @@
#ifndef TRAILER_H
#define TRAILER_H
+#include "list.h"
+
enum trailer_where {
WHERE_END,
WHERE_AFTER,
@@ -44,8 +46,18 @@ struct trailer_info {
size_t trailer_nr;
};
+/*
+ * A list that represents newly-added trailers, such as those provided
+ * with the --trailer command line option of git-interpret-trailers.
+ */
+struct new_trailer_item {
+ struct list_head list;
+
+ const char *text;
+};
+
void process_trailers(const char *file, int in_place, int trim_empty,
- struct string_list *trailers);
+ struct list_head *new_trailer_head);
void trailer_info_get(struct trailer_info *info, const char *str);