|
|
@@ -84,21 +84,22 @@ public class ForPathTest extends RepositoryTestCase { |
|
|
|
ObjectId tree = tree0.writeTree(oi); |
|
|
|
|
|
|
|
// Find the directories that were implicitly created above. |
|
|
|
TreeWalk tw = new TreeWalk(or); |
|
|
|
tw.addTree(tree); |
|
|
|
ObjectId a = null; |
|
|
|
ObjectId aSlashC = null; |
|
|
|
while (tw.next()) { |
|
|
|
if (tw.getPathString().equals("a")) { |
|
|
|
a = tw.getObjectId(0); |
|
|
|
tw.enterSubtree(); |
|
|
|
while (tw.next()) { |
|
|
|
if (tw.getPathString().equals("a/c")) { |
|
|
|
aSlashC = tw.getObjectId(0); |
|
|
|
break; |
|
|
|
try (TreeWalk tw = new TreeWalk(or)) { |
|
|
|
tw.addTree(tree); |
|
|
|
while (tw.next()) { |
|
|
|
if (tw.getPathString().equals("a")) { |
|
|
|
a = tw.getObjectId(0); |
|
|
|
tw.enterSubtree(); |
|
|
|
while (tw.next()) { |
|
|
|
if (tw.getPathString().equals("a/c")) { |
|
|
|
aSlashC = tw.getObjectId(0); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
} |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|