From 3a54f5bd5db0478c39a52b4da149e3c2413f46eb Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 12 Jun 2025 15:25:36 -0700 Subject: merge/pull: add the "--compact-summary" option "git merge" and "git pull" shows "git diff --stat --summary @{1}" when they finish to indicate the extent of the changes brought into the history by default. While it gives a good overview, it becomes annoying when there are very many created or deleted paths. Introduce "--compact-summary" option to these two commands that tells it to instead show "git diff --compact-summary @{1}", which gives the same information in a lot more compact form in such a situation. Signed-off-by: Junio C Hamano --- builtin/pull.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'builtin/pull.c') diff --git a/builtin/pull.c b/builtin/pull.c index a1ebc6ad33..6e72a2e9a4 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -143,6 +143,9 @@ static struct option pull_options[] = { OPT_PASSTHRU(0, "summary", &opt_diffstat, NULL, N_("(synonym to --stat)"), PARSE_OPT_NOARG | PARSE_OPT_HIDDEN), + OPT_PASSTHRU(0, "compact-summary", &opt_diffstat, NULL, + N_("show a compact-summary at the end of the merge"), + PARSE_OPT_NOARG), OPT_PASSTHRU(0, "log", &opt_log, N_("n"), N_("add (at most ) entries from shortlog to merge commit message"), PARSE_OPT_OPTARG), -- cgit 1.2.3-korg