Re: [PATCH v4 1/2] diff: add --line-prefix option for passing in a prefix

2016-08-11 Thread Junio C Hamano
Subject: SQUASH??? clarify the if/{if/else} nesting Otherwise GCC helpfully warns you. Signed-off-by: Junio C Hamano --- diff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/diff.c b/diff.c index bfc0a6b..d128b9d 100644 --- a/diff.c +++ b/diff.c @@ -1170,11 +1170,12 @@ c

Re: [PATCH v4 1/2] diff: add --line-prefix option for passing in a prefix

2016-08-11 Thread Jacob Keller
On Thu, Aug 11, 2016 at 10:22 AM, Junio C Hamano wrote: > -- >8 -- > Subject: diff.c: remove output_prefix_length field > > "diff/log --stat" has a logic that determines the display columns > available for the diffstat part of the output and apportions it for > pathnames and diffstat graph automat

Re: [PATCH v4 1/2] diff: add --line-prefix option for passing in a prefix

2016-08-11 Thread Junio C Hamano
Jacob Keller writes: > const char *diff_line_prefix(struct diff_options *opt) > { > struct strbuf *msgbuf; > + > if (!opt->output_prefix) > - return ""; > + if (opt->line_prefix) > + return opt->line_prefix; > + else > +

[PATCH v4 1/2] diff: add --line-prefix option for passing in a prefix

2016-08-10 Thread Jacob Keller
From: Jacob Keller This will be used by a future patch which implements a diff mode for submodule display. Without this, the diff output would incorrectly display when using both -p and --graph during a git-log. Note that the --line-prefix will be displayed first prior to any other output prefix