|
|
|
@ -96,7 +96,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase {
|
|
|
|
|
public void test001_Initalize() { |
|
|
|
|
final File gitdir = new File(trash, Constants.DOT_GIT); |
|
|
|
|
final File hooks = new File(gitdir, "hooks"); |
|
|
|
|
final File objects = new File(gitdir, "objects"); |
|
|
|
|
final File objects = new File(gitdir, Constants.OBJECTS); |
|
|
|
|
final File objects_pack = new File(objects, "pack"); |
|
|
|
|
final File objects_info = new File(objects, "info"); |
|
|
|
|
final File refs = new File(gitdir, "refs"); |
|
|
|
@ -148,7 +148,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase {
|
|
|
|
|
assertEqualsPath(theDir, r.getDirectory()); |
|
|
|
|
assertEqualsPath(repo1Parent, r.getWorkTree()); |
|
|
|
|
assertEqualsPath(new File(theDir, "index"), r.getIndexFile()); |
|
|
|
|
assertEqualsPath(new File(theDir, "objects"), r.getObjectDatabase() |
|
|
|
|
assertEqualsPath(new File(theDir, Constants.OBJECTS), r.getObjectDatabase() |
|
|
|
|
.getDirectory()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -174,7 +174,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase {
|
|
|
|
|
assertEqualsPath(theDir, r.getDirectory()); |
|
|
|
|
assertEqualsPath(repo1Parent.getParentFile(), r.getWorkTree()); |
|
|
|
|
assertEqualsPath(new File(theDir, "index"), r.getIndexFile()); |
|
|
|
|
assertEqualsPath(new File(theDir, "objects"), r.getObjectDatabase() |
|
|
|
|
assertEqualsPath(new File(theDir, Constants.OBJECTS), r.getObjectDatabase() |
|
|
|
|
.getDirectory()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -198,7 +198,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase {
|
|
|
|
|
assertEqualsPath(theDir, r.getDirectory()); |
|
|
|
|
assertEqualsPath(repo1Parent, r.getWorkTree()); |
|
|
|
|
assertEqualsPath(new File(theDir, "index"), r.getIndexFile()); |
|
|
|
|
assertEqualsPath(new File(theDir, "objects"), r.getObjectDatabase() |
|
|
|
|
assertEqualsPath(new File(theDir, Constants.OBJECTS), r.getObjectDatabase() |
|
|
|
|
.getDirectory()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -227,7 +227,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase {
|
|
|
|
|
assertEqualsPath(theDir, r.getDirectory()); |
|
|
|
|
assertEqualsPath(workdir, r.getWorkTree()); |
|
|
|
|
assertEqualsPath(new File(theDir, "index"), r.getIndexFile()); |
|
|
|
|
assertEqualsPath(new File(theDir, "objects"), r.getObjectDatabase() |
|
|
|
|
assertEqualsPath(new File(theDir, Constants.OBJECTS), r.getObjectDatabase() |
|
|
|
|
.getDirectory()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -256,7 +256,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase {
|
|
|
|
|
assertEqualsPath(theDir, r.getDirectory()); |
|
|
|
|
assertEqualsPath(workdir, r.getWorkTree()); |
|
|
|
|
assertEqualsPath(new File(theDir, "index"), r.getIndexFile()); |
|
|
|
|
assertEqualsPath(new File(theDir, "objects"), r.getObjectDatabase() |
|
|
|
|
assertEqualsPath(new File(theDir, Constants.OBJECTS), r.getObjectDatabase() |
|
|
|
|
.getDirectory()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -312,7 +312,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
final File o = new File(new File(new File(newdb.getDirectory(), |
|
|
|
|
"objects"), "4b"), "825dc642cb6eb9a060e54bf8d69288fbee4904"); |
|
|
|
|
Constants.OBJECTS), "4b"), "825dc642cb6eb9a060e54bf8d69288fbee4904"); |
|
|
|
|
assertTrue("Exists " + o, o.isFile()); |
|
|
|
|
assertTrue("Read-only " + o, !o.canWrite()); |
|
|
|
|
} |
|
|
|
@ -324,7 +324,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase {
|
|
|
|
|
final ObjectId treeId = insertTree(new TreeFormatter()); |
|
|
|
|
assertEquals("4b825dc642cb6eb9a060e54bf8d69288fbee4904", treeId.name()); |
|
|
|
|
final File o = new File(new File( |
|
|
|
|
new File(db.getDirectory(), "objects"), "4b"), |
|
|
|
|
new File(db.getDirectory(), Constants.OBJECTS), "4b"), |
|
|
|
|
"825dc642cb6eb9a060e54bf8d69288fbee4904"); |
|
|
|
|
assertFalse("Exists " + o, o.isFile()); |
|
|
|
|
} |
|
|
|
|