/** * Get the raw contents of the blob at the given path in the commit that * HEAD references. * * @param repository * @param path * @return content or null if no blob with path at HEAD commit */ public static byte[] getRawHeadContent(final Repository repository, final String path) { return getRawContent(repository, HEAD, path); }
/** * Get the contents of the blob in the commit located at the given path. * * @param repository * @param commitId * @param path * @return contents or null if no blob with path at given commit */ public static String getContent(final Repository repository, final ObjectId commitId, final String path) { return toString(repository, getRawContent(repository, commitId, path)); }
/** * Get the contents of the blob at the given path in the commit that the * revision references. * * @param repository * @param revision * @param path * @return contents or null if no blob with path at given revision */ public static String getContent(final Repository repository, final String revision, final String path) { return toString(repository, getRawContent(repository, revision, path)); }