diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-10-15 07:48:02 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-10-15 07:48:02 +0300 |
commit | b6d712fa4e11e51e479b9e25090afff85e5d710a (patch) | |
tree | e087924cba548832c282a08eb20c973c8e1ea265 /t/t3206-range-diff.sh | |
parent | 77458870a5b1ab4d7c8f2c4825e888571a32979b (diff) | |
parent | 2b6a9b13ca4a687aeb0cad5f32e49711b3e67aaa (diff) |
Merge branch 'tg/range-diff-output-update'
"git range-diff" failed to handle mode-only change, which has been
corrected.
* tg/range-diff-output-update:
range-diff: don't segfault with mode-only changes
Diffstat (limited to 't/t3206-range-diff.sh')
-rwxr-xr-x | t/t3206-range-diff.sh | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh index 64b66f2094..0579cd9969 100755 --- a/t/t3206-range-diff.sh +++ b/t/t3206-range-diff.sh @@ -333,6 +333,46 @@ test_expect_success 'renamed file' ' test_cmp expected actual ' +test_expect_success 'file with mode only change' ' + git range-diff --no-color --submodule=log topic...mode-only-change >actual && + sed s/Z/\ /g >expected <<-EOF && + 1: fccce22 ! 1: 4d39cb3 s/4/A/ + @@ Metadata + ZAuthor: Thomas Rast <trast@inf.ethz.ch> + Z + Z ## Commit message ## + - s/4/A/ + + s/4/A/ + add other-file + Z + Z ## file ## + Z@@ + @@ file + Z A + Z 6 + Z 7 + + + + ## other-file (new) ## + 2: 147e64e ! 2: 26c107f s/11/B/ + @@ Metadata + ZAuthor: Thomas Rast <trast@inf.ethz.ch> + Z + Z ## Commit message ## + - s/11/B/ + + s/11/B/ + mode change other-file + Z + Z ## file ## + Z@@ file: A + @@ file: A + Z 12 + Z 13 + Z 14 + + + + ## other-file (mode change 100644 => 100755) ## + 3: a63e992 = 3: 4c1e0f5 s/12/B/ + EOF + test_cmp expected actual +' + test_expect_success 'file added and later removed' ' git range-diff --no-color --submodule=log topic...added-removed >actual && sed s/Z/\ /g >expected <<-EOF && |