Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-10-30 09:43:40 +0300
committerJunio C Hamano <gitster@pobox.com>2018-10-30 09:43:40 +0300
commitd450e56423cfb5fbbdc7679e80605afd5b33b18b (patch)
treed00ddee882bc4037ea9368e835bc1115aff06e16 /t
parent42a165c90fad01e2bc49579743bf58cb92534770 (diff)
parent0e573e8fcc395b5249c1c4713c2e385893c98b8c (diff)
Merge branch 'lm/range-diff-submodule-fix'
"git range-diff" did not work well when the compared ranges had changes in submodules and the "--submodule=log" was used. * lm/range-diff-submodule-fix: range-diff: allow to diff files regardless of submodule config
Diffstat (limited to 't')
-rwxr-xr-xt/t3206-range-diff.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh
index 045aca1c18..6aae364171 100755
--- a/t/t3206-range-diff.sh
+++ b/t/t3206-range-diff.sh
@@ -122,6 +122,35 @@ test_expect_success 'changed commit' '
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 &&
+ 1: 4de457d = 1: a4b3333 s/5/A/
+ 2: fccce22 = 2: f51d370 s/4/A/
+ 3: 147e64e ! 3: 0559556 s/11/B/
+ @@ -10,7 +10,7 @@
+ 9
+ 10
+ -11
+ -+B
+ ++BB
+ 12
+ 13
+ 14
+ 4: a63e992 ! 4: d966c5c s/12/B/
+ @@ -8,7 +8,7 @@
+ @@
+ 9
+ 10
+ - B
+ + BB
+ -12
+ +B
+ 13
+ EOF
+ test_cmp expected actual
+'
+
test_expect_success 'no commits on one side' '
git commit --amend -m "new message" &&
git range-diff master HEAD@{1} HEAD