summaryrefslogtreecommitdiff
path: root/graph.c
diff options
context:
space:
mode:
authorDan McGee <dpmcgee@gmail.com>2011-04-05 00:40:23 -0500
committerJunio C Hamano <gitster@pobox.com>2011-04-04 23:20:39 -0700
commit7cd52b5b4bf3be1f5d33fed889af186aae1ea7b8 (patch)
treed66df4a57ed2cbf96816ae87205cb5c8283661fc /graph.c
parent485cdb9bd8bd7de6c7099c1c3e9c6fca6a60fdd3 (diff)
downloadgit-7cd52b5b4bf3be1f5d33fed889af186aae1ea7b8.tar.gz
Share color list between graph and show-branch
This also adds the new colors to show-branch that were added a while back for graph output. Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'graph.c')
-rw-r--r--graph.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/graph.c b/graph.c
index ef2e24e85a..2f6893dc4f 100644
--- a/graph.c
+++ b/graph.c
@@ -59,27 +59,6 @@ enum graph_state {
GRAPH_COLLAPSING
};
-/*
- * The list of available column colors.
- */
-static const char *column_colors_ansi[] = {
- GIT_COLOR_RED,
- GIT_COLOR_GREEN,
- GIT_COLOR_YELLOW,
- GIT_COLOR_BLUE,
- GIT_COLOR_MAGENTA,
- GIT_COLOR_CYAN,
- GIT_COLOR_BOLD_RED,
- GIT_COLOR_BOLD_GREEN,
- GIT_COLOR_BOLD_YELLOW,
- GIT_COLOR_BOLD_BLUE,
- GIT_COLOR_BOLD_MAGENTA,
- GIT_COLOR_BOLD_CYAN,
- GIT_COLOR_RESET,
-};
-
-#define COLUMN_COLORS_ANSI_MAX (ARRAY_SIZE(column_colors_ansi) - 1)
-
static const char **column_colors;
static unsigned short column_colors_max;
@@ -228,7 +207,7 @@ struct git_graph *graph_init(struct rev_info *opt)
if (!column_colors)
graph_set_column_colors(column_colors_ansi,
- COLUMN_COLORS_ANSI_MAX);
+ column_colors_ansi_max);
graph->commit = NULL;
graph->revs = opt;