| Modifier and Type | Class and Description |
|---|---|
| public static class | RepoCommand.
A default implementation of |
| pack-priv static class | |
| public static class | RepoCommand.
Read-only view of contents and file mode (i.e. permissions) for a file in a remote repository. |
| public static interface | RepoCommand.
A callback to get ref sha1 of a repository from its uri. |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private PersonIdent | |
| private BareSuperprojectWriter. | |
| private String | |
| private String | |
| private RepoCommand. | |
| private final List | |
| private String | |
| private ManifestParser. | |
| private InputStream | |
| private String | |
| private ProgressMonitor | |
| private static final String | |
| private String | |
| private URI |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public RepoCommand | Returns: this commandwhere to create the file in the destination repository path, String content for the create file contents)Create a file with the given content in the destination repository |
| public RevCommit | call()
Implements abstract org. Implements java. Computes a result, or throws an exception if unable to do so. |
| pack-priv static URI | |
| private List | Returns: projects that are renamed if necessaryparsed projects projects)Rename the projects if there's a conflict when converted to submodules. |
| public RepoCommand | Returns: this commandthe author's author)org.Set the author/committer for the bare repository commit. |
| public RepoCommand | |
| public RepoCommand | |
| public RepoCommand | Returns: this commandWhether to ignore the remote failures. ignore)Set whether to skip projects whose commits don't exist remotely. |
| public RepoCommand | Returns: this commandSet the IncludedFileReader callback. |
| public RepoCommand | Returns: this commanda inputStream)java. object.Set the input stream to the manifest XML. |
| public RepoCommand | |
| public RepoCommand | Returns: this commandThe progress monitor associated with the clone operation. |
| public RepoCommand | Returns: this commandWhether to record the shallow recommendation. enable)Set whether the clone-depth field should be recorded as a shallow recommendation in .gitmodules. |
| public RepoCommand | Returns: this commandWhether to record the branch name enable)Set whether the branch name should be recorded in .gitmodules. |
| public RepoCommand | Returns: this commandWhether to record the labels in the .gitattributes enable)Set whether the labels field should be recorded as a label in .gitattributes. |
| public RepoCommand | Returns: this commandSet the GetHeadFromUri callback. |
| public RepoCommand | |
| public RepoCommand | Returns: this commandthe URI of the repository holding the superproject. uri)Set the URI of the superproject (this repository), so the .gitmodules file can specify the submodule URLs relative to the superproject. |
| public RepoCommand |
| author | back to summary |
|---|---|
| private PersonIdent author | |
| bareWriterConfig | back to summary |
|---|---|
| private BareSuperprojectWriter. | |
| baseUri | back to summary |
|---|---|
| private String baseUri | |
| branch | back to summary |
|---|---|
| private String branch | |
| callback | back to summary |
|---|---|
| private RepoCommand. | |
| extraContents | back to summary |
|---|---|
| private final List<BareSuperprojectWriter. | |
| groupsParam | back to summary |
|---|---|
| private String groupsParam | |
| includedReader | back to summary |
|---|---|
| private ManifestParser. | |
| inputStream | back to summary |
|---|---|
| private InputStream inputStream | |
| manifestPath | back to summary |
|---|---|
| private String manifestPath | |
| monitor | back to summary |
|---|---|
| private ProgressMonitor monitor | |
| SLASH | back to summary |
|---|---|
| private static final String SLASH | |
| targetBranch | back to summary |
|---|---|
| private String targetBranch | |
| targetUri | back to summary |
|---|---|
| private URI targetUri | |
| RepoCommand | back to summary |
|---|---|
| public RepoCommand(Repository repo) Constructor for RepoCommand
| |
| addToDestination | back to summary |
|---|---|
| public RepoCommand addToDestination(String path, String contents) Create a file with the given content in the destination repository
| |
| call | back to summary |
|---|---|
| public RevCommit call() throws GitAPIException Implements abstract org. Implements java. Doc from org. Computes a result, or throws an exception if unable to do so. Execute the command
| |
| relativize | back to summary |
|---|---|
| pack-priv static URI relativize(URI current, URI target) | |
| renameProjects | back to summary |
|---|---|
| private List Rename the projects if there's a conflict when converted to submodules.
| |
| setAuthor | back to summary |
|---|---|
| public RepoCommand setAuthor(PersonIdent author) Set the author/committer for the bare repository commit. For non-bare repositories, the current user will be used and this will be ignored.
| |
| setBranch | back to summary |
|---|---|
| public RepoCommand setBranch(String branch) Set default 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.
| |
| setGroups | back to summary |
|---|---|
| public RepoCommand setGroups(String groups) Set groups to sync
| |
| setIgnoreRemoteFailures | back to summary |
|---|---|
| public RepoCommand setIgnoreRemoteFailures(boolean ignore) Set whether to skip projects whose commits don't exist remotely. When set to true, we'll just skip the manifest entry and continue on to the next one. When set to false (default), we'll throw an error when remote failures occur. Not implemented for non-bare repositories.
| |
| setIncludedFileReader | back to summary |
|---|---|
| public RepoCommand setIncludedFileReader(ManifestParser. Set the IncludedFileReader callback.
| |
| setInputStream | back to summary |
|---|---|
| public RepoCommand setInputStream(InputStream inputStream) Set the input stream to the manifest XML.
Setting inputStream will ignore the path set. It will be closed in
| |
| setPath | back to summary |
|---|---|
| public RepoCommand setPath(String path) Set path to the manifest XML file.
Calling
| |
| setProgressMonitor | back to summary |
|---|---|
| public RepoCommand setProgressMonitor(ProgressMonitor monitor) The progress monitor associated with the clone operation. By default,
this is set to
| |
| setRecommendShallow | back to summary |
|---|---|
| public RepoCommand setRecommendShallow(boolean enable) Set whether the clone-depth field should be recorded as a shallow recommendation in .gitmodules. Not implemented for non-bare repositories.
| |
| setRecordRemoteBranch | back to summary |
|---|---|
| public RepoCommand setRecordRemoteBranch(boolean enable) Set whether the branch name should be recorded in .gitmodules. Submodule entries in .gitmodules can include a "branch" field to indicate what remote branch each submodule tracks. That field is used by "git submodule update --remote" to update to the tip of the tracked branch when asked and by Gerrit to update the superproject when a change on that branch is merged. Subprojects that request a specific commit or tag will not have a branch name recorded. Not implemented for non-bare repositories.
| |
| setRecordSubmoduleLabels | back to summary |
|---|---|
| public RepoCommand setRecordSubmoduleLabels(boolean enable) Set whether the labels field should be recorded as a label in .gitattributes. Not implemented for non-bare repositories.
| |
| setRemoteReader | back to summary |
|---|---|
| public RepoCommand setRemoteReader(RepoCommand. Set the GetHeadFromUri callback. This is only used in bare repositories.
| |
| setTargetBranch | back to summary |
|---|---|
| public RepoCommand setTargetBranch(String branch) Set target 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.
| |
| setTargetURI | back to summary |
|---|---|
| public RepoCommand setTargetURI(String uri) Set the URI of the superproject (this repository), so the .gitmodules file can specify the submodule URLs relative to the superproject.
| |
| setURI | back to summary |
|---|---|
| public RepoCommand setURI(String uri) Set base URI of the paths inside the XML. This is typically the name of the directory holding the manifest repository, eg. for https://android.googlesource.com/platform/manifest, this should be /platform (if you would run this on android.googlesource.com) or https://android.googlesource.com/platform elsewhere.
| |
RemoteReader callback.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public RepoCommand. | readFileWithMode(String
The URI of the remote repository uri, String Name of the ref to lookup. May be a short-hand form, e.g.
"master" which is automatically expanded to
"refs/heads/master" if "refs/heads/master" already exists. ref, String The relative path (inside the repo) to the file to read path)Implements org. Read contents and mode (i.e. permissions) of the file from a remote repository. |
| public ObjectId | sha1(String
The URI of the remote repository uri, String Name of the ref to lookup. May be a short-hand form, e.g.
"master" which is automatically expanded to
"refs/heads/master" if "refs/heads/master" already exists. ref)Implements org. Read a remote ref sha1. |
| DefaultRemoteReader | back to summary |
|---|---|
| public DefaultRemoteReader() | |
| readFileWithMode | back to summary |
|---|---|
| public RepoCommand. Implements org. Doc from org. Read contents and mode (i.e. permissions) of the file from a remote repository.
| |
| sha1 | back to summary |
|---|---|
| public ObjectId sha1(String uri, String ref) throws GitAPIException Implements org. Doc from org. Read a remote ref sha1.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| ManifestErrorException | back to summary |
|---|---|
| pack-priv ManifestErrorException(Throwable cause) | |
| Modifier and Type | Field and Description |
|---|---|
| private final byte[] | |
| private final FileMode |
| Access | Constructor and Description |
|---|---|
| public | RemoteFile(byte[]
Raw contents of the file. contents, FileMode Git file mode for this file (e.g. executable or regular) fileMode)
|
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | |
| public FileMode |
| contents | back to summary |
|---|---|
| private final byte[] contents
| |
| fileMode | back to summary |
|---|---|
| private final FileMode fileMode
| |
| RemoteFile | back to summary |
|---|---|
public RemoteFile(byte[] contents, FileMode fileMode)
| |
| getContents | back to summary |
|---|---|
| public byte[] getContents() Contents of the file. Callers who receive this reference must not modify its contents (as it can point to internal cached data).
| |
| getFileMode | back to summary |
|---|---|
| public FileMode getFileMode() Get file mode | |
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 |
|---|---|
| public RepoCommand. | Returns: The contents and file mode of the file in the given repository and branch. Never null.The URI of the remote repository uri, String Name of the ref to lookup. May be a short-hand form, e.g.
"master" which is automatically expanded to
"refs/heads/master" if "refs/heads/master" already exists. ref, String The relative path (inside the repo) to the file to read path)Read contents and mode (i.e. permissions) of the file from a remote repository. |
| public ObjectId | Returns: the sha1 of the remote repository, or null if the ref does not exist.The URI of the remote repository uri, String Name of the ref to lookup. May be a short-hand form, e.g.
"master" which is automatically expanded to
"refs/heads/master" if "refs/heads/master" already exists. ref)Read a remote ref sha1. |
| readFileWithMode | back to summary |
|---|---|
| public RepoCommand. Read contents and mode (i.e. permissions) of the file from a remote repository.
| |
| sha1 | back to summary |
|---|---|
| public ObjectId sha1(String uri, String ref) throws GitAPIException Read a remote ref sha1.
| |