summaryrefslogtreecommitdiff
path: root/t/t3206-range-diff.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-11-18 09:23:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-18 09:23:54 (GMT)
commita5170794372cf1325710a3419473c91ec4af53bf (patch)
tree4072402827e66130f30fa1e409bd10e2e3232e47 /t/t3206-range-diff.sh
parent6d2035ee605980efa9915e10d35e7a355fc74077 (diff)
parenta48e12ef7a9498084dc510765452bc3b8677683f (diff)
downloadgit-a5170794372cf1325710a3419473c91ec4af53bf.zip
git-a5170794372cf1325710a3419473c91ec4af53bf.tar.gz
git-a5170794372cf1325710a3419473c91ec4af53bf.tar.bz2
Merge branch 'ab/range-diff-no-patch'
The "--no-patch" option, which can be used to get a high-level overview without the actual line-by-line patch difference shown, of the "range-diff" command was earlier broken, which has been corrected. * ab/range-diff-no-patch: range-diff: make diff option behavior (e.g. --stat) consistent range-diff: fix regression in passing along diff options range-diff doc: add a section about output stability
Diffstat (limited to 't/t3206-range-diff.sh')
-rwxr-xr-xt/t3206-range-diff.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh
index 6aae364..e497c13 100755
--- a/t/t3206-range-diff.sh
+++ b/t/t3206-range-diff.sh
@@ -122,6 +122,36 @@ test_expect_success 'changed commit' '
test_cmp expected actual
'
+test_expect_success 'changed commit with --no-patch diff option' '
+ git range-diff --no-color --no-patch topic...changed >actual &&
+ cat >expected <<-EOF &&
+ 1: 4de457d = 1: a4b3333 s/5/A/
+ 2: fccce22 = 2: f51d370 s/4/A/
+ 3: 147e64e ! 3: 0559556 s/11/B/
+ 4: a63e992 ! 4: d966c5c s/12/B/
+ EOF
+ test_cmp expected actual
+'
+
+test_expect_success 'changed commit with --stat diff option' '
+ git range-diff --no-color --stat topic...changed >actual &&
+ cat >expected <<-EOF &&
+ 1: 4de457d = 1: a4b3333 s/5/A/
+ a => b | 0
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ 2: fccce22 = 2: f51d370 s/4/A/
+ a => b | 0
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ 3: 147e64e ! 3: 0559556 s/11/B/
+ a => b | 0
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ 4: a63e992 ! 4: d966c5c s/12/B/
+ a => b | 0
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ EOF
+ test_cmp expected actual
+'
+
test_expect_success 'changed commit with sm config' '
git range-diff --no-color --submodule=log topic...changed >actual &&
cat >expected <<-EOF &&