Skip to content

Commit 8331837

Browse files
committed
Merge branch 'en/dir-rename-tests' into seen
More preliminary tests have been added to document desired outcome of various "directory rename" situations. * en/dir-rename-tests: t6423: more involved rules for renaming directories into each other t6423: update directory rename detection tests with new rule t6423: more involved directory rename test directory-rename-detection.txt: update references to regression tests
2 parents 7c4d680 + c64432a commit 8331837

File tree

2 files changed

+553
-54
lines changed

2 files changed

+553
-54
lines changed

Documentation/technical/directory-rename-detection.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ It is perhaps easiest to start with an example:
1818
More interesting possibilities exist, though, such as:
1919

2020
* one side of history renames x -> z, and the other renames some file to
21-
x/e, causing the need for the merge to do a transitive rename.
21+
x/e, causing the need for the merge to do a transitive rename so that
22+
the rename ends up at z/e.
2223

2324
* one side of history renames x -> z, but also renames all files within x.
2425
For example, x/a -> z/alpha, x/b -> z/bravo, etc.
@@ -35,7 +36,7 @@ More interesting possibilities exist, though, such as:
3536
directory itself contained inner directories that were renamed to yet
3637
other locations).
3738

38-
* combinations of the above; see t/t6043-merge-rename-directories.sh for
39+
* combinations of the above; see t/t6423-merge-rename-directories.sh for
3940
various interesting cases.
4041

4142
Limitations -- applicability of directory renames
@@ -62,19 +63,19 @@ directory rename detection applies:
6263
Limitations -- detailed rules and testcases
6364
-------------------------------------------
6465

65-
t/t6043-merge-rename-directories.sh contains extensive tests and commentary
66+
t/t6423-merge-rename-directories.sh contains extensive tests and commentary
6667
which generate and explore the rules listed above. It also lists a few
6768
additional rules:
6869

6970
a) If renames split a directory into two or more others, the directory
7071
with the most renames, "wins".
7172

72-
b) Avoid directory-rename-detection for a path, if that path is the
73-
source of a rename on either side of a merge.
74-
75-
c) Only apply implicit directory renames to directories if the other side
73+
b) Only apply implicit directory renames to directories if the other side
7674
of history is the one doing the renaming.
7775

76+
c) Do not perform directory rename detection for directories which had no
77+
new paths added to them.
78+
7879
Limitations -- support in different commands
7980
--------------------------------------------
8081

0 commit comments

Comments
 (0)