@Test public void getObjectIdTest() throws IOException { AnyObjectId objectId = writeToCache("a/b.txt"); RevTree tree = commitToMaster().getTree(); assertEquals(objectId, TreeUtils.getObjectId("a/b.txt", tree, repo)); }
@Nullable public static ObjectId getObjectId(TreeWalk tw) { return tw.getObjectId(0); }
TreeUtils { @Nullable public static ObjectId getObjectId(TreeWalk tw) { return tw.getObjectId(0); } }
TreeUtils { @Nullable public static ObjectId getObjectId(TreeWalk tw) { return tw.getObjectId(0); }  }
TreeUtils { @Nullable public static ObjectId getObjectId(TreeWalk tw) { return tw.getObjectId(0); }  @Nonnull static String normalizeNodePath(String path); @Nonnull static TreeWalk newTreeWalk(AnyObjectId tree, ObjectReader reader); @Nonnull static TreeWalk newTreeWalk(AnyObjectId tree, Repository repo); @Nullable static TreeWalk forPath(String path, AnyObjectId tree, ObjectReader reader); @Nullable static TreeWalk forPath(String path, AnyObjectId tree, Repository repo); static boolean exists(String path, AnyObjectId tree, ObjectReader reader); static boolean exists(String path, AnyObjectId tree, Repository repo); @Nullable static ObjectId getObjectId(TreeWalk tw); @Nullable static ObjectId getObjectId(String path, AnyObjectId tree, ObjectReader reader); @Nullable static ObjectId getObjectId(String path, AnyObjectId tree, Repository repo); @Nullable static FileMode getFileMode(TreeWalk tw); @Nullable static FileMode getFileMode(String path, AnyObjectId tree, ObjectReader reader); @Nullable static FileMode getFileMode(String path, AnyObjectId tree, Repository repo); @Nonnull static InputStream openFile(String path, AnyObjectId tree, ObjectReader reader); @Nonnull static InputStream openFile(String path, AnyObjectId tree, Repository repo); @Nonnull static BlobSnapshot readFile(String path, ObjectId tree, ObjectReader reader); @Nonnull static BlobSnapshot readFile(String path, ObjectId tree, Repository repo); static boolean isDirectory(TreeWalk tw); static boolean isDirectory(String path, AnyObjectId tree, ObjectReader reader); static boolean isDirectory(String path, AnyObjectId tree, Repository repo); static boolean isFile(TreeWalk tw); static boolean isFile(String path, AnyObjectId tree, ObjectReader reader); static boolean isFile(String path, AnyObjectId tree, Repository repo); static boolean isSymbolicLink(TreeWalk tw); static boolean isSymbolicLink(String path, AnyObjectId tree, ObjectReader reader); static boolean isSymbolicLink(String path, AnyObjectId tree, Repository repo); @Nonnull static ObjectId insertTree(TreeFormatter tf, Repository repo); }
TreeUtils { @Nullable public static ObjectId getObjectId(TreeWalk tw) { return tw.getObjectId(0); }  @Nonnull static String normalizeNodePath(String path); @Nonnull static TreeWalk newTreeWalk(AnyObjectId tree, ObjectReader reader); @Nonnull static TreeWalk newTreeWalk(AnyObjectId tree, Repository repo); @Nullable static TreeWalk forPath(String path, AnyObjectId tree, ObjectReader reader); @Nullable static TreeWalk forPath(String path, AnyObjectId tree, Repository repo); static boolean exists(String path, AnyObjectId tree, ObjectReader reader); static boolean exists(String path, AnyObjectId tree, Repository repo); @Nullable static ObjectId getObjectId(TreeWalk tw); @Nullable static ObjectId getObjectId(String path, AnyObjectId tree, ObjectReader reader); @Nullable static ObjectId getObjectId(String path, AnyObjectId tree, Repository repo); @Nullable static FileMode getFileMode(TreeWalk tw); @Nullable static FileMode getFileMode(String path, AnyObjectId tree, ObjectReader reader); @Nullable static FileMode getFileMode(String path, AnyObjectId tree, Repository repo); @Nonnull static InputStream openFile(String path, AnyObjectId tree, ObjectReader reader); @Nonnull static InputStream openFile(String path, AnyObjectId tree, Repository repo); @Nonnull static BlobSnapshot readFile(String path, ObjectId tree, ObjectReader reader); @Nonnull static BlobSnapshot readFile(String path, ObjectId tree, Repository repo); static boolean isDirectory(TreeWalk tw); static boolean isDirectory(String path, AnyObjectId tree, ObjectReader reader); static boolean isDirectory(String path, AnyObjectId tree, Repository repo); static boolean isFile(TreeWalk tw); static boolean isFile(String path, AnyObjectId tree, ObjectReader reader); static boolean isFile(String path, AnyObjectId tree, Repository repo); static boolean isSymbolicLink(TreeWalk tw); static boolean isSymbolicLink(String path, AnyObjectId tree, ObjectReader reader); static boolean isSymbolicLink(String path, AnyObjectId tree, Repository repo); @Nonnull static ObjectId insertTree(TreeFormatter tf, Repository repo);  }