public static interface RepoCommand.RemoteReader
RepoCommand.DefaultRemoteReader
to
use ls-remote command to read the sha1 from the repository and clone the
repository to read the file. Callers may have their own quicker
implementation.Modifier and Type | Method and Description |
---|---|
byte[] |
readFile(java.lang.String uri,
java.lang.String ref,
java.lang.String path)
Read a file from a remote repository.
|
ObjectId |
sha1(java.lang.String uri,
java.lang.String ref)
Read a remote ref sha1.
|
@Nullable ObjectId sha1(java.lang.String uri, java.lang.String ref) throws GitAPIException
uri
- The URI of the remote repositoryref
- The ref (branch/tag/etc.) to readGitAPIException
byte[] readFile(java.lang.String uri, java.lang.String ref, java.lang.String path) throws GitAPIException, java.io.IOException
uri
- The URI of the remote repositoryref
- The ref (branch/tag/etc.) to readpath
- The relative path (inside the repo) to the file to readGitAPIException
java.io.IOException