|
|
|
@ -103,8 +103,9 @@ public class FileTreeIteratorJava7Test extends RepositoryTestCase {
|
|
|
|
|
}); |
|
|
|
|
assertTrue(dce.commit()); |
|
|
|
|
} |
|
|
|
|
new Git(db).commit().setMessage("Adding link").call(); |
|
|
|
|
new Git(db).reset().setMode(ResetType.HARD).call(); |
|
|
|
|
try (Git git = new Git(db)) { |
|
|
|
|
git.commit().setMessage("Adding link").call(); |
|
|
|
|
git.reset().setMode(ResetType.HARD).call(); |
|
|
|
|
DirCacheIterator dci = new DirCacheIterator(db.readDirCache()); |
|
|
|
|
FileTreeIterator fti = new FileTreeIterator(db); |
|
|
|
|
|
|
|
|
@ -116,6 +117,7 @@ public class FileTreeIteratorJava7Test extends RepositoryTestCase {
|
|
|
|
|
assertFalse(fti.isModified(dci.getDirCacheEntry(), true, |
|
|
|
|
db.newObjectReader())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Like #testSymlinkNotModifiedThoughNormalized but there is no |
|
|
|
@ -142,8 +144,9 @@ public class FileTreeIteratorJava7Test extends RepositoryTestCase {
|
|
|
|
|
}); |
|
|
|
|
assertTrue(dce.commit()); |
|
|
|
|
} |
|
|
|
|
new Git(db).commit().setMessage("Adding link").call(); |
|
|
|
|
new Git(db).reset().setMode(ResetType.HARD).call(); |
|
|
|
|
try (Git git = new Git(db)) { |
|
|
|
|
git.commit().setMessage("Adding link").call(); |
|
|
|
|
git.reset().setMode(ResetType.HARD).call(); |
|
|
|
|
DirCacheIterator dci = new DirCacheIterator(db.readDirCache()); |
|
|
|
|
FileTreeIterator fti = new FileTreeIterator(db); |
|
|
|
|
|
|
|
|
@ -155,6 +158,7 @@ public class FileTreeIteratorJava7Test extends RepositoryTestCase {
|
|
|
|
|
assertFalse(fti.isModified(dci.getDirCacheEntry(), true, |
|
|
|
|
db.newObjectReader())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Like #testSymlinkNotModifiedThoughNormalized but here the link is |
|
|
|
@ -182,8 +186,9 @@ public class FileTreeIteratorJava7Test extends RepositoryTestCase {
|
|
|
|
|
}); |
|
|
|
|
assertTrue(dce.commit()); |
|
|
|
|
} |
|
|
|
|
new Git(db).commit().setMessage("Adding link").call(); |
|
|
|
|
new Git(db).reset().setMode(ResetType.HARD).call(); |
|
|
|
|
try (Git git = new Git(db)) { |
|
|
|
|
git.commit().setMessage("Adding link").call(); |
|
|
|
|
git.reset().setMode(ResetType.HARD).call(); |
|
|
|
|
|
|
|
|
|
FileUtils.delete(new File(trash, "link"), FileUtils.NONE); |
|
|
|
|
FS.DETECTED.createSymLink(new File(trash, "link"), "newtarget"); |
|
|
|
@ -199,3 +204,4 @@ public class FileTreeIteratorJava7Test extends RepositoryTestCase {
|
|
|
|
|
db.newObjectReader())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|