diff --git a/graph.c b/graph.c index 6a4db229bb..c8833ecc3e 100644 --- a/graph.c +++ b/graph.c @@ -316,6 +316,9 @@ static const char *diff_output_prefix_callback(struct diff_options *opt, void *d assert(opt); + if (!graph) + return opt->line_prefix; + strbuf_reset(&msgbuf); if (opt->line_prefix) strbuf_addstr(&msgbuf, opt->line_prefix);