|
|
|
@ -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"); |
|
|
|
@ -198,4 +203,5 @@ public class FileTreeIteratorJava7Test extends RepositoryTestCase {
|
|
|
|
|
assertTrue(fti.isModified(dci.getDirCacheEntry(), true, |
|
|
|
|
db.newObjectReader())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|