From: Junio C Hamano Date: Wed, 14 Mar 2018 19:01:02 +0000 (-0700) Subject: Merge branch 'nd/diff-stat-with-summary' X-Git-Tag: v2.17.0-rc0~17 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/868f7d23384931641aa4901aab27f3f23577e63b Merge branch 'nd/diff-stat-with-summary' "git diff" and friends learned "--compact-summary" that shows the information usually given with the "--summary" option on the same line as the diffstat output of the "--stat" option (which saves vertical space and keeps info on a single path at the same place). * nd/diff-stat-with-summary: diff: add --compact-summary diff.c: refactor pprint_rename() to use strbuf --- 868f7d23384931641aa4901aab27f3f23577e63b diff --cc diff.c index 915f4d6e9f,95124c0e7c..4c59f5f5d3 --- a/diff.c +++ b/diff.c @@@ -2045,11 -2045,10 +2045,10 @@@ static void fn_out_consume(void *priv, } } - static char *pprint_rename(const char *a, const char *b) + static void pprint_rename(struct strbuf *name, const char *a, const char *b) { - const char *old = a; - const char *new = b; + const char *old_name = a; + const char *new_name = b; - struct strbuf name = STRBUF_INIT; int pfx_length, sfx_length; int pfx_adjust_for_slash; int len_a = strlen(a); diff --cc diff.h index 6bd278aac1,28a8fb4346..d29560f822 --- a/diff.h +++ b/diff.h @@@ -92,7 -91,9 +92,8 @@@ struct diff_flags unsigned override_submodule_config:1; unsigned dirstat_by_line:1; unsigned funccontext:1; - unsigned pickaxe_ignore_case:1; unsigned default_follow_renames:1; + unsigned stat_with_summary:1; }; static inline void diff_flags_or(struct diff_flags *a,