objectId = ObjectId.fromString(proj.getRevision()); } else { objectId = callback.sha1(url, proj.getRevision()); if (objectId == null && !ignoreRemoteFailures) { throw new RemoteUnavailableException(url); RemoteFile rf = callback.readFileWithMode( url, proj.getRevision(), copyfile.src); objectId = inserter.insert(Constants.OBJ_BLOB,
objectId = ObjectId.fromString(proj.getRevision()); } else { objectId = callback.sha1(url, proj.getRevision()); if (objectId == null && !ignoreRemoteFailures) { throw new RemoteUnavailableException(url); RemoteFile rf = callback.readFileWithMode( url, proj.getRevision(), copyfile.src); objectId = inserter.insert(Constants.OBJ_BLOB,
/** * Read a file from a remote repository. * * @param uri * The URI of the remote repository * @param ref * The ref (branch/tag/etc.) to read * @param path * The relative path (inside the repo) to the file to read * @return the file content. * @throws GitAPIException * @throws IOException * @since 3.5 * * @deprecated Use {@link #readFileWithMode(String, String, String)} * instead */ @Deprecated public default byte[] readFile(String uri, String ref, String path) throws GitAPIException, IOException { return readFileWithMode(uri, ref, path).getContents(); }
/** * Read a file from a remote repository. * * @param uri * The URI of the remote repository * @param ref * The ref (branch/tag/etc.) to read * @param path * The relative path (inside the repo) to the file to read * @return the file content. * @throws GitAPIException * @throws IOException * @since 3.5 * * @deprecated Use {@link #readFileWithMode(String, String, String)} * instead */ @Deprecated public default byte[] readFile(String uri, String ref, String path) throws GitAPIException, IOException { return readFileWithMode(uri, ref, path).getContents(); }