diff options
| author | Junio C Hamano <gitster@pobox.com> | 2012-05-02 13:51:59 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2012-05-02 13:51:59 -0700 |
| commit | 73ff8cf784b6ee447072fad6c06fd0eef0e9c9f6 (patch) | |
| tree | 6f93ea84bccd1e22b5d048a5bd7096b18be6d109 /graph.c | |
| parent | 85dcc3820b6471a9ad367ebc7ede37a8cb0d9fba (diff) | |
| parent | bafa16e53c8845f3d3b7713dcbef8a5c841cadad (diff) | |
| download | git-73ff8cf784b6ee447072fad6c06fd0eef0e9c9f6.tar.gz | |
Merge branch 'lp/diffstat-with-graph'
"log --graph" was not very friendly with "--stat" option and its output
had line breaks at wrong places.
By Lucian Poston (5) and Zbigniew Jędrzejewski-Szmek (2)
* lp/diffstat-with-graph:
t4052: work around shells unable to set COLUMNS to 1
Prevent graph_width of stat width from falling below min
t4052: Test diff-stat output with minimum columns
t4052: Adjust --graph --stat output for prefixes
Adjust stat width calculations to take --graph output into account
Add output_prefix_length to diff_options
t4052: test --stat output with --graph
Diffstat (limited to 'graph.c')
| -rw-r--r-- | graph.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -194,8 +194,10 @@ static struct strbuf *diff_output_prefix_callback(struct diff_options *opt, void struct git_graph *graph = data; static struct strbuf msgbuf = STRBUF_INIT; + assert(opt); assert(graph); + opt->output_prefix_length = graph->width; strbuf_reset(&msgbuf); graph_padding_line(graph, &msgbuf); return &msgbuf; @@ -245,6 +247,7 @@ struct git_graph *graph_init(struct rev_info *opt) */ opt->diffopt.output_prefix = diff_output_prefix_callback; opt->diffopt.output_prefix_data = graph; + opt->diffopt.output_prefix_length = 0; return graph; } |
