diff options
| author | Elijah Newren <newren@gmail.com> | 2021-06-30 17:29:58 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-06-30 14:40:09 -0700 |
| commit | 806f83287f8d6c0568beed7ca5d603f936d53c40 (patch) | |
| tree | 6558a70ca35033d686b9bc79ed4920f7eba496ce /commit.c | |
| parent | Git 2.32 (diff) | |
| download | git-806f83287f8d6c0568beed7ca5d603f936d53c40.tar.gz git-806f83287f8d6c0568beed7ca5d603f936d53c40.zip | |
t6423: test directory renames causing rename-to-self
Directory rename detection can cause transitive renames, e.g. if the two
different sides of history each do one half of:
A/file -> B/file
B/ -> C/
then directory rename detection transitively renames to give us C/file.
Since the default for merge.directoryRenames is conflict, this results
in an error message saying it is unclear whether the file should be
placed at B/file or C/file.
What if C/ is A/, though? In such a case, the transitive rename would
give us A/file, the original name we started with. Logically, having
an error message with B/file vs. A/file should be fine, as should
leaving the file where it started. But the logic in both
merge-recursive and merge-ort did not handle a case of a filename being
renamed to itself correctly; merge-recursive had two bugs, and merge-ort
had one. Add some testcases covering such a scenario.
Based-on-testcase-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions
