git/pretty.c

#define USE_THE_REPOSITORY_VARIABLE

#include "git-compat-util.h"
#include "config.h"
#include "commit.h"
#include "environment.h"
#include "gettext.h"
#include "hash.h"
#include "hex.h"
#include "utf8.h"
#include "diff.h"
#include "pager.h"
#include "revision.h"
#include "string-list.h"
#include "mailmap.h"
#include "log-tree.h"
#include "notes.h"
#include "color.h"
#include "reflog-walk.h"
#include "gpg-interface.h"
#include "trailer.h"
#include "run-command.h"
#include "object-name.h"

/*
 * The limit for formatting directives, which enable the caller to append
 * arbitrarily many bytes to the formatted buffer. This includes padding
 * and wrapping formatters.
 */
#define FORMATTING_LIMIT

static char *user_format;
static struct cmt_fmt_map {} *commit_formats;
static size_t builtin_formats_len;
static size_t commit_formats_len;
static size_t commit_formats_alloc;
static struct cmt_fmt_map *find_commit_format(const char *sought);

int commit_format_is_empty(enum cmit_fmt fmt)
{}

static void save_user_format(struct rev_info *rev, const char *cp, int is_tformat)
{}

static int git_pretty_formats_config(const char *var, const char *value,
				     const struct config_context *ctx UNUSED,
				     void *cb UNUSED)
{}

static void setup_commit_formats(void)
{}

static struct cmt_fmt_map *find_commit_format_recursive(const char *sought,
							const char *original,
							int num_redirections)
{}

static struct cmt_fmt_map *find_commit_format(const char *sought)
{}

void get_commit_format(const char *arg, struct rev_info *rev)
{}

/*
 * Generic support for pretty-printing the header
 */
static int get_one_line(const char *msg)
{}

/* High bit set, or ISO-2022-INT */
static int non_ascii(int ch)
{}

int has_non_ascii(const char *s)
{}

static int is_rfc822_special(char ch)
{}

static int needs_rfc822_quoting(const char *s, int len)
{}

static int last_line_length(struct strbuf *sb)
{}

static void add_rfc822_quoted(struct strbuf *out, const char *s, int len)
{}

enum rfc2047_type {};

static int is_rfc2047_special(char ch, enum rfc2047_type type)
{}

static int needs_rfc2047_encoding(const char *line, int len)
{}

static void add_rfc2047(struct strbuf *sb, const char *line, size_t len,
		       const char *encoding, enum rfc2047_type type)
{}

const char *show_ident_date(const struct ident_split *ident,
			    struct date_mode mode)
{}

static inline void strbuf_add_with_color(struct strbuf *sb, const char *color,
					 const char *buf, size_t buflen)
{}

static void append_line_with_color(struct strbuf *sb, struct grep_opt *opt,
				   const char *line, size_t linelen,
				   int color, enum grep_context ctx,
				   enum grep_header_field field)
{}

static int use_in_body_from(const struct pretty_print_context *pp,
			    const struct ident_split *ident)
{}

void pp_user_info(struct pretty_print_context *pp,
		  const char *what, struct strbuf *sb,
		  const char *line, const char *encoding)
{}

static int is_blank_line(const char *line, int *len_p)
{}

const char *skip_blank_lines(const char *msg)
{}

static void add_merge_info(const struct pretty_print_context *pp,
			   struct strbuf *sb, const struct commit *commit)
{}

static char *get_header(const char *msg, const char *key)
{}

static char *replace_encoding_header(char *buf, const char *encoding)
{}

const char *repo_logmsg_reencode(struct repository *r,
				 const struct commit *commit,
				 char **commit_encoding,
				 const char *output_encoding)
{}

static int mailmap_name(const char **email, size_t *email_len,
			const char **name, size_t *name_len)
{}

static size_t format_person_part(struct strbuf *sb, char part,
				 const char *msg, int len,
				 struct date_mode dmode)
{}

struct chunk {};

enum flush_type {};

enum trunc_type {};

struct format_commit_context {};

static void parse_commit_header(struct format_commit_context *context)
{}

static int istitlechar(char c)
{}

void format_sanitized_subject(struct strbuf *sb, const char *msg, size_t len)
{}

const char *format_subject(struct strbuf *sb, const char *msg,
			   const char *line_separator)
{}

static void parse_commit_message(struct format_commit_context *c)
{}

static void strbuf_wrap(struct strbuf *sb, size_t pos,
			size_t width, size_t indent1, size_t indent2)
{}

static void rewrap_message_tail(struct strbuf *sb,
				struct format_commit_context *c,
				size_t new_width, size_t new_indent1,
				size_t new_indent2)
{}

static int format_reflog_person(struct strbuf *sb,
				char part,
				struct reflog_walk_info *log,
				struct date_mode dmode)
{}

static size_t parse_color(struct strbuf *sb, /* in UTF-8 */
			  const char *placeholder,
			  struct format_commit_context *c)
{}

static size_t parse_padding_placeholder(const char *placeholder,
					struct format_commit_context *c)
{}

static int match_placeholder_arg_value(const char *to_parse, const char *candidate,
				       const char **end, const char **valuestart,
				       size_t *valuelen)
{}

static int match_placeholder_bool_arg(const char *to_parse, const char *candidate,
				      const char **end, int *val)
{}

static int format_trailer_match_cb(const struct strbuf *key, void *ud)
{}

static struct strbuf *expand_string_arg(struct strbuf *sb,
					const char *argval, size_t arglen)
{}

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)
{}

static size_t parse_describe_args(const char *start, struct strvec *args)
{}


static int parse_decoration_option(const char **arg,
				   const char *name,
				   char **opt)
{}

static void parse_decoration_options(const char **arg,
				     struct decoration_options *opts)
{}

static void free_decoration_options(const struct decoration_options *opts)
{}

static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */
				const char *placeholder,
				void *context)
{}

static size_t format_and_pad_commit(struct strbuf *sb, /* in UTF-8 */
				    const char *placeholder,
				    struct format_commit_context *c)
{}

static size_t format_commit_item(struct strbuf *sb, /* in UTF-8 */
				 const char *placeholder,
				 struct format_commit_context *context)
{}

void userformat_find_requirements(const char *fmt, struct userformat_want *w)
{}

void repo_format_commit_message(struct repository *r,
				const struct commit *commit,
				const char *format, struct strbuf *sb,
				const struct pretty_print_context *pretty_ctx)
{}

static void pp_header(struct pretty_print_context *pp,
		      const char *encoding,
		      const struct commit *commit,
		      const char **msg_p,
		      struct strbuf *sb)
{}

void pp_email_subject(struct pretty_print_context *pp,
		      const char **msg_p,
		      struct strbuf *sb,
		      const char *encoding,
		      int need_8bit_cte)
{}

static int pp_utf8_width(const char *start, const char *end)
{}

static void strbuf_add_tabexpand(struct strbuf *sb, struct grep_opt *opt,
				 int color, int tabwidth, const char *line,
				 int linelen)
{}

/*
 * pp_handle_indent() prints out the indentation, and
 * the whole line (without the final newline), after
 * de-tabifying.
 */
static void pp_handle_indent(struct pretty_print_context *pp,
			     struct strbuf *sb, int indent,
			     const char *line, int linelen)
{}

static int is_mboxrd_from(const char *line, int len)
{}

void pp_remainder(struct pretty_print_context *pp,
		  const char **msg_p,
		  struct strbuf *sb,
		  int indent)
{}

void pretty_print_commit(struct pretty_print_context *pp,
			 const struct commit *commit,
			 struct strbuf *sb)
{}

void pp_commit_easy(enum cmit_fmt fmt, const struct commit *commit,
		    struct strbuf *sb)
{}