#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "gettext.h"
#include "config.h"
#include "commit.h"
#include "color.h"
#include "graph.h"
#include "revision.h"
#include "strvec.h"
static void graph_padding_line(struct git_graph *graph, struct strbuf *sb);
static void graph_show_strbuf(struct git_graph *graph,
FILE *file,
struct strbuf const *sb);
struct column { … };
enum graph_state { … };
static void graph_show_line_prefix(const struct diff_options *diffopt)
{ … }
static const char **column_colors;
static unsigned short column_colors_max;
static void parse_graph_colors_config(struct strvec *colors, const char *string)
{ … }
void graph_set_column_colors(const char **colors, unsigned short colors_max)
{ … }
static const char *column_get_color_code(unsigned short color)
{ … }
struct graph_line { … };
static inline void graph_line_addch(struct graph_line *line, int c)
{ … }
static inline void graph_line_addchars(struct graph_line *line, int c, size_t n)
{ … }
static inline void graph_line_addstr(struct graph_line *line, const char *s)
{ … }
static inline void graph_line_addcolor(struct graph_line *line, unsigned short color)
{ … }
static void graph_line_write_column(struct graph_line *line, const struct column *c,
char col_char)
{ … }
struct git_graph { … };
static const char *diff_output_prefix_callback(struct diff_options *opt, void *data)
{ … }
static const struct diff_options *default_diffopt;
void graph_setup_line_prefix(struct diff_options *diffopt)
{ … }
struct git_graph *graph_init(struct rev_info *opt)
{ … }
void graph_clear(struct git_graph *graph)
{ … }
static void graph_update_state(struct git_graph *graph, enum graph_state s)
{ … }
static void graph_ensure_capacity(struct git_graph *graph, int num_columns)
{ … }
static int graph_is_interesting(struct git_graph *graph, struct commit *commit)
{ … }
static struct commit_list *next_interesting_parent(struct git_graph *graph,
struct commit_list *orig)
{ … }
static struct commit_list *first_interesting_parent(struct git_graph *graph)
{ … }
static unsigned short graph_get_current_column_color(const struct git_graph *graph)
{ … }
static void graph_increment_column_color(struct git_graph *graph)
{ … }
static unsigned short graph_find_commit_color(const struct git_graph *graph,
const struct commit *commit)
{ … }
static int graph_find_new_column_by_commit(struct git_graph *graph,
struct commit *commit)
{ … }
static void graph_insert_into_new_columns(struct git_graph *graph,
struct commit *commit,
int idx)
{ … }
static void graph_update_columns(struct git_graph *graph)
{ … }
static int graph_num_dashed_parents(struct git_graph *graph)
{ … }
static int graph_num_expansion_rows(struct git_graph *graph)
{ … }
static int graph_needs_pre_commit_line(struct git_graph *graph)
{ … }
void graph_update(struct git_graph *graph, struct commit *commit)
{ … }
static int graph_is_mapping_correct(struct git_graph *graph)
{ … }
static void graph_pad_horizontally(struct git_graph *graph, struct graph_line *line)
{ … }
static void graph_output_padding_line(struct git_graph *graph,
struct graph_line *line)
{ … }
int graph_width(struct git_graph *graph)
{ … }
static void graph_output_skip_line(struct git_graph *graph, struct graph_line *line)
{ … }
static void graph_output_pre_commit_line(struct git_graph *graph,
struct graph_line *line)
{ … }
static void graph_output_commit_char(struct git_graph *graph, struct graph_line *line)
{ … }
static void graph_draw_octopus_merge(struct git_graph *graph, struct graph_line *line)
{ … }
static void graph_output_commit_line(struct git_graph *graph, struct graph_line *line)
{ … }
static const char merge_chars[] = …;
static void graph_output_post_merge_line(struct git_graph *graph, struct graph_line *line)
{ … }
static void graph_output_collapsing_line(struct git_graph *graph, struct graph_line *line)
{ … }
int graph_next_line(struct git_graph *graph, struct strbuf *sb)
{ … }
static void graph_padding_line(struct git_graph *graph, struct strbuf *sb)
{ … }
int graph_is_commit_finished(struct git_graph const *graph)
{ … }
void graph_show_commit(struct git_graph *graph)
{ … }
void graph_show_oneline(struct git_graph *graph)
{ … }
void graph_show_padding(struct git_graph *graph)
{ … }
int graph_show_remainder(struct git_graph *graph)
{ … }
static void graph_show_strbuf(struct git_graph *graph,
FILE *file,
struct strbuf const *sb)
{ … }
void graph_show_commit_msg(struct git_graph *graph,
FILE *file,
struct strbuf const *sb)
{ … }