From dac03b5518a053e52ed7ee20925970728d3ae4c3 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Thu, 24 Jan 2019 07:36:47 -0500 Subject: combine-diff: treat --dirstat like --stat Currently "--cc --dirstat" will show nothing for a merge. Like --shortstat and --summary in the previous two patches, it probably makes sense to treat it like we do --stat, and show a stat against the first-parent. This case is less obviously correct than for --shortstat and --summary, as those are basically variants of --stat themselves. It's possible we could develop a multi-parent combined dirstat format, in which case we might regret defining this first-parent behavior. But the same could be said for --stat, and in the 12+ years of it showing first-parent stats, nobody has complained. So showing the first-parent dirstat is at least _useful_, and if we later develop a clever multi-parent stat format, we'd probably have to deal with --stat anyway. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- combine-diff.c | 1 + 1 file changed, 1 insertion(+) (limited to 'combine-diff.c') diff --git a/combine-diff.c b/combine-diff.c index ea79830f619..dc9d9866186 100644 --- a/combine-diff.c +++ b/combine-diff.c @@ -1327,6 +1327,7 @@ static const char *path_path(void *obj) #define STAT_FORMAT_MASK (DIFF_FORMAT_NUMSTAT \ | DIFF_FORMAT_SHORTSTAT \ | DIFF_FORMAT_SUMMARY \ + | DIFF_FORMAT_DIRSTAT \ | DIFF_FORMAT_DIFFSTAT) /* find set of paths that every parent touches */ -- cgit v1.2.3