public class RepoCommand extends GitCommand<RevCommit>
Modifier and Type | Class and Description |
---|---|
static class |
RepoCommand.DefaultRemoteReader
A default implementation of
RepoCommand.RemoteReader callback. |
static interface |
RepoCommand.RemoteReader
A callback to get ref sha1 of a repository from its uri.
|
repo
Constructor and Description |
---|
RepoCommand(Repository repo) |
Modifier and Type | Method and Description |
---|---|
RevCommit |
call()
Executes the command
|
RepoCommand |
setAuthor(PersonIdent author)
Set the author/committer for the bare repository commit.
|
RepoCommand |
setBranch(String branch)
Set default branch.
|
RepoCommand |
setGroups(String groups)
Set groups to sync
|
RepoCommand |
setIncludedFileReader(ManifestParser.IncludedFileReader reader)
Set the IncludedFileReader callback.
|
RepoCommand |
setInputStream(InputStream inputStream)
Set the input stream to the manifest XML.
|
RepoCommand |
setPath(String path)
Set path to the manifest XML file.
|
RepoCommand |
setProgressMonitor(ProgressMonitor monitor)
The progress monitor associated with the clone operation.
|
RepoCommand |
setRemoteReader(RepoCommand.RemoteReader callback)
Set the GetHeadFromUri callback.
|
RepoCommand |
setTargetBranch(String branch)
Set target branch.
|
RepoCommand |
setURI(String uri)
Set base URI of the pathes inside the XML
|
checkCallable, getRepository, setCallable
public RepoCommand(Repository repo)
repo
- public RepoCommand setPath(String path)
Calling setInputStream(java.io.InputStream)
will ignore the path set here.
path
- (with /
as separator)public RepoCommand setInputStream(InputStream inputStream)
Setting inputStream will ignore the path set. It will be closed in
call()
.
inputStream
- public RepoCommand setURI(String uri)
uri
- public RepoCommand setGroups(String groups)
groups
- groups separated by comma, examples: default|all|G1,-G2,-G3public RepoCommand setBranch(String branch)
This is generally the name of the branch the manifest file was in. If there's no default revision (branch) specified in manifest and no revision specified in project, this branch will be used.
branch
- public RepoCommand setTargetBranch(String branch)
This is the target branch of the super project to be updated. If not set, default is HEAD.
For non-bare repositories, HEAD will always be used and this will be ignored.
branch
- public RepoCommand setProgressMonitor(ProgressMonitor monitor)
NullProgressMonitor
monitor
- NullProgressMonitor
public RepoCommand setAuthor(PersonIdent author)
For non-bare repositories, the current user will be used and this will be ignored.
author
- public RepoCommand setRemoteReader(RepoCommand.RemoteReader callback)
callback
- public RepoCommand setIncludedFileReader(ManifestParser.IncludedFileReader reader)
reader
- public RevCommit call() throws GitAPIException
GitCommand
call
in interface Callable<RevCommit>
call
in class GitCommand<RevCommit>
GitAPIException
- or subclass thereof when an error occursCopyright © 2015 Eclipse JGit Project. All rights reserved.