Signed-off-by: Johannes Schindelin <redacted>
---
graph.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/graph.c b/graph.c
index 5e2f224..6a8622c 100644
--- a/graph.c
+++ b/graph.c
@@ -5,7 +5,6 @@
#include "diff.h"
#include "revision.h"
-extern int diff_use_color_default;
/* Internal API */
/*
@@ -1253,15 +1252,17 @@ static void strbuf_write_column(struct strbuf *sb, const struct column *c,
* right flag to be checking since --no-color doesn't turn
* this off.
*/
- if (diff_use_color_default)
+ if (c->color)
strbuf_addstr(sb, c->color);
strbuf_addstr(sb, s);
- if (diff_use_color_default)
+ if (c->color)
strbuf_addstr(sb, GIT_COLOR_RESET);
}
static char* get_current_column_color (const struct git_graph* graph)
{
+ if (!DIFF_OPT_TST(&graph->revs->diffopt, COLOR_DIFF))
+ return NULL;
return column_colors[graph->default_column_color];
}
--
1.6.2.1.493.g67cf3