]> git.ipfire.org Git - thirdparty/git.git/blobdiff - pretty.h
refs: unify parse_worktree_ref() and ref_type()
[thirdparty/git.git] / pretty.h
index f034609e4db6e68efb24a149c580fc7bda3c4cfa..f34e24c53a4925aec51cd62117654fdd5f7f980e 100644 (file)
--- a/pretty.h
+++ b/pretty.h
@@ -2,6 +2,7 @@
 #define PRETTY_H
 
 #include "cache.h"
+#include "date.h"
 #include "string-list.h"
 
 struct commit;
@@ -65,12 +66,16 @@ static inline int cmit_fmt_is_mail(enum cmit_fmt fmt)
        return (fmt == CMIT_FMT_EMAIL || fmt == CMIT_FMT_MBOXRD);
 }
 
+/*
+ * Examine the user-specified format given by "fmt" (or if NULL, the global one
+ * previously saved by get_commit_format()), and set flags based on which items
+ * the format will need when it is expanded.
+ */
 struct userformat_want {
        unsigned notes:1;
        unsigned source:1;
+       unsigned decorate:1;
 };
-
-/* Set the flag "w->notes" if there is placeholder %N in "fmt". */
 void userformat_find_requirements(const char *fmt, struct userformat_want *w);
 
 /*
@@ -159,4 +164,13 @@ int format_set_trailers_options(struct process_trailer_options *opts,
                        const char **arg,
                        char **invalid_arg);
 
+/*
+ * Like show_date, but pull the timestamp and tz parameters from
+ * the ident_split. It will also sanity-check the values and produce
+ * a well-known sentinel date if they appear bogus.
+ */
+const char *show_ident_date(const struct ident_split *id,
+                           const struct date_mode *mode);
+
+
 #endif /* PRETTY_H */