diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-04-13 14:12:32 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-13 14:12:32 -0700 |
commit | 26effb8487386e431990905d4eba7e81f1018eda (patch) | |
tree | c0d17729b7454c9b999b82f968ba27c84561d612 /t/t4001-diff-rename.sh | |
parent | 69d65bc7a38bd01049d8baa5efef7331ab9c71d2 (diff) | |
parent | ca4e3ca029def86b7b29451d4ba77ef76574949e (diff) | |
download | git-26effb8487386e431990905d4eba7e81f1018eda.tar.gz git-26effb8487386e431990905d4eba7e81f1018eda.tar.xz |
Merge branch 'sg/diff-multiple-identical-renames'
"git diff -M" used to work better when two originally identical
files A and B got renamed to X/A and X/B by pairing A to X/A and B
to X/B, but this was broken in the 2.0 timeframe.
* sg/diff-multiple-identical-renames:
diffcore: fix iteration order of identical files during rename detection
Diffstat (limited to 't/t4001-diff-rename.sh')
-rwxr-xr-x | t/t4001-diff-rename.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t4001-diff-rename.sh b/t/t4001-diff-rename.sh index c7e58b69a..0d1fa45d2 100755 --- a/t/t4001-diff-rename.sh +++ b/t/t4001-diff-rename.sh @@ -140,6 +140,17 @@ test_expect_success 'favour same basenames even with minor differences' ' git show HEAD:path1 | sed "s/15/16/" > subdir/path1 && git status | test_i18ngrep "renamed: .*path1 -> subdir/path1"' +test_expect_success 'two files with same basename and same content' ' + git reset --hard && + mkdir -p dir/A dir/B && + cp path1 dir/A/file && + cp path1 dir/B/file && + git add dir && + git commit -m 2 && + git mv dir other-dir && + git status | test_i18ngrep "renamed: .*dir/A/file -> other-dir/A/file" +' + test_expect_success 'setup for many rename source candidates' ' git reset --hard && for i in 0 1 2 3 4 5 6 7 8 9; |