summaryrefslogtreecommitdiff
path: root/t/t4013
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2019-01-24 12:36:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-01-24 20:18:53 (GMT)
commitdac03b5518a053e52ed7ee20925970728d3ae4c3 (patch)
treefdafb212f5589a240346ce29fa29a1b2383e9726 /t/t4013
parent04b19fcafd734245e61fd1c090cd7de8c2993eaa (diff)
downloadgit-dac03b5518a053e52ed7ee20925970728d3ae4c3.zip
git-dac03b5518a053e52ed7ee20925970728d3ae4c3.tar.gz
git-dac03b5518a053e52ed7ee20925970728d3ae4c3.tar.bz2
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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013')
-rw-r--r--t/t4013/diff.diff_--dirstat_--cc_master~1_master3
1 files changed, 3 insertions, 0 deletions
diff --git a/t/t4013/diff.diff_--dirstat_--cc_master~1_master b/t/t4013/diff.diff_--dirstat_--cc_master~1_master
new file mode 100644
index 0000000..fba4e34
--- /dev/null
+++ b/t/t4013/diff.diff_--dirstat_--cc_master~1_master
@@ -0,0 +1,3 @@
+$ git diff --dirstat --cc master~1 master
+ 40.0% dir/
+$