From 0ae37d4000e7aa67cfdbbf2fdcaf6f0d4ef37b16 Mon Sep 17 00:00:00 2001 From: Thomas Wolf Date: Tue, 15 Mar 2022 22:48:48 +0100 Subject: DirCacheCheckout: use a LinkedHashMap instead of HashMap This guarantees that updates are checked out in git order, which is important for LFS if a .lfsconfig file is used. That file comes early in git order, and the LFS smudge filter will consider the working tree version. To ensure that on branch switches the correct version of that file is used, the checkout order must be stable and should be the git order. Change-Id: I20f6d11bf08558f9d5adfd2be71e36321460038c Signed-off-by: Thomas Wolf --- .../tst/org/eclipse/jgit/lfs/LfsConfigGitTest.java | 8 -------- 1 file changed, 8 deletions(-) (limited to 'org.eclipse.jgit.lfs.test') diff --git a/org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/LfsConfigGitTest.java b/org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/LfsConfigGitTest.java index 98a0712e47..3ac41571a4 100644 --- a/org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/LfsConfigGitTest.java +++ b/org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/LfsConfigGitTest.java @@ -142,14 +142,6 @@ public class LfsConfigGitTest extends RepositoryTestCase { File gitAttributesFile; private void createLfsFiles(String lfsPointer) throws Exception { - /* - * FileNames ".aaa.txt" and "zzz.txt" seem to be sufficient to get the - * desired checkout order before and after ".lfsconfig", at least in a - * number of manual tries. Since the files to checkout are contained in - * a set (see DirCacheCheckout::doCheckout) the order cannot be - * guaranteed. - */ - //File to be checked out before lfs config String fileNameBefore = ".aaa.txt"; fileBefore = writeTrashFile(fileNameBefore, lfsPointer); -- cgit v1.2.3