aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder@ira.uka.de>2008-04-06 03:23:43 +0200
committerJunio C Hamano <gitster@pobox.com>2008-04-12 19:28:18 -0700
commitd8abe148bece83f6c3e5ebe6075aef236322ed74 (patch)
treede668ac4309de778b211bd4834a5cc14090b6e6c /t
parentf5a84c372f8f044899dde91f1a415d2bf963377e (diff)
downloadgit-d8abe148bece83f6c3e5ebe6075aef236322ed74.tar.gz
git-d8abe148bece83f6c3e5ebe6075aef236322ed74.tar.xz
merge, pull: introduce '--(no-)stat' option
This option has the same effect as '--(no-)summary' (i.e. whether to show a diffsat at the end of the merge or not), and it is consistent with the '--stat' option of other git commands. Documentation, tests, and bash completion are updaed accordingly, and the old --summary option is marked as being deprected. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t7600-merge.sh23
1 files changed, 19 insertions, 4 deletions
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index 56869acee..dd3eb9736 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -364,7 +364,7 @@ test_expect_success 'merge c1 with c2 (squash in config)' '
test_debug 'gitk --all'
-test_expect_success 'override config option -n' '
+test_expect_success 'override config option -n with --summary' '
git reset --hard c1 &&
git config branch.master.mergeoptions "-n" &&
test_tick &&
@@ -373,15 +373,30 @@ test_expect_success 'override config option -n' '
verify_parents $c1 $c2 &&
if ! grep "^ file | *2 +-$" diffstat.txt
then
- echo "[OOPS] diffstat was not generated"
+ echo "[OOPS] diffstat was not generated with --summary"
+ false
+ fi
+'
+
+test_expect_success 'override config option -n with --stat' '
+ git reset --hard c1 &&
+ git config branch.master.mergeoptions "-n" &&
+ test_tick &&
+ git merge --stat c2 >diffstat.txt &&
+ verify_merge file result.1-5 msg.1-5 &&
+ verify_parents $c1 $c2 &&
+ if ! grep "^ file | *2 +-$" diffstat.txt
+ then
+ echo "[OOPS] diffstat was not generated with --stat"
+ false
fi
'
test_debug 'gitk --all'
-test_expect_success 'override config option --summary' '
+test_expect_success 'override config option --stat' '
git reset --hard c1 &&
- git config branch.master.mergeoptions "--summary" &&
+ git config branch.master.mergeoptions "--stat" &&
test_tick &&
git merge -n c2 >diffstat.txt &&
verify_merge file result.1-5 msg.1-5 &&