| Modifier and Type | Class and Description |
|---|---|
| public static enum | SubmoduleWalk.
The values for the config parameter submodule. |
| Modifier and Type | Field and Description |
|---|---|
| private RepositoryBuilderFactory | |
| private Config | |
| private String | |
| private Map | |
| private StoredConfig | |
| private final Repository | |
| private AbstractTreeIterator | |
| private final TreeWalk |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements java. Closes this resource, relinquishing any underlying resources. |
| public static boolean | Returns: true if the working tree contains a .gitmodules
file, false otherwise. Always returns
false for bare repositories.the repository to check repository)Checks whether the working tree contains a .gitmodules file. |
| public static SubmoduleWalk | Returns: generator over submodule index entries. The caller is responsible for callingclose().a repository)org. object.Create a generator to walk over the submodule entries currently in the
index
The |
| public static SubmoduleWalk | Returns: generator at given path. The caller is responsible for callingclose(). Null if no submodule at given path.a repository, AnyObjectId org. object.the root of a tree containing both a submodule at the given
path and .gitmodules at the root. treeId, String a path)java. object.Create a generator and advance it to the submodule entry at the given path |
| public static SubmoduleWalk | Returns: generator at given path. The caller is responsible for callingclose(). Null if no submodule at given path.a repository, AbstractTreeIterator org. object.the root of a tree containing both a submodule at the given
path and .gitmodules at the root. iterator, String a path)java. object.Create a generator and advance it to the submodule entry at the given path |
| private BaseRepositoryBuilder | |
| public String | |
| public String | |
| public File | Returns: submodule repository directoryGet directory that will be the root of the submodule's local repository |
| public ObjectId | Returns: object id of HEAD referenceGet commit id that HEAD points to in the current submodule's repository |
| public String | Returns: ref name, null on failuresGet ref that HEAD points to in the current submodule's repository |
| private String | |
| public String | Returns: name of the submoduleThe module name for the current submodule entry (used for the section name of .git/config) |
| public SubmoduleWalk. | |
| public String | |
| public String | |
| public String | |
| public ObjectId | |
| public String | |
| public String | |
| public Repository | Returns: repository or null if non-existentGet repository for current submodule entry |
| public static File | Returns: directorysubmodule path path)Get submodule directory |
| public static String | Returns: resolved URLparent repository parent, final String absolute or relative URL of the submodule repository url)Resolve submodule repository URL. |
| public static Repository | Returns: repository or null if repository doesn't existsubmodule path path)Get submodule repository |
| public static Repository | Returns: repository or null if repository doesn't existthe parent parent, final String submodule path path)Get submodule repository at path |
| public static Repository | Returns: repository or null if repository doesn't existRepository that contains the submoduleof the working tree of the submodule path, FS the file system abstraction to be used fs)Get submodule repository at path, using the specified file system abstraction |
| public static Repository | getSubmoduleRepository(File
Repository that contains the submoduleof the working tree of the submodule path, FS FS to useBaseRepositoryBuilder to use to build the submodule
repositoryGet submodule repository at path, using the specified file system abstraction and the specified builder |
| private void | |
| public SubmoduleWalk | |
| private void | |
| public boolean | |
| public SubmoduleWalk | |
| public void | setBuilderFactory(RepositoryBuilderFactory
to set factory)Sets the |
| public SubmoduleWalk | |
| public SubmoduleWalk | Returns: this generator.gitmodules config object config)Set the config used by this walk. |
| public SubmoduleWalk | Returns: this generatortree containing .gitmodules tree)Set the tree used by this walk for finding |
| public SubmoduleWalk | Returns: this generatorID of a tree containing .gitmodules id)Set the tree used by this walk for finding |
| public SubmoduleWalk | Returns: this generatorSet the tree iterator used for finding submodule entries |
| public SubmoduleWalk | Returns: this generatoran treeId)org. object.Set the tree used for finding submodule entries |
| factory | back to summary |
|---|---|
| private RepositoryBuilderFactory factory | |
| modulesConfig | back to summary |
|---|---|
| private Config modulesConfig | |
| path | back to summary |
|---|---|
| private String path | |
| pathToName | back to summary |
|---|---|
| private Map<String, String> pathToName | |
| repoConfig | back to summary |
|---|---|
| private StoredConfig repoConfig | |
| repository | back to summary |
|---|---|
| private final Repository repository | |
| rootTree | back to summary |
|---|---|
| private AbstractTreeIterator rootTree | |
| walk | back to summary |
|---|---|
| private final TreeWalk walk | |
| SubmoduleWalk | back to summary |
|---|---|
| public SubmoduleWalk(Repository repository) throws IOException Create submodule generator
| |
| close | back to summary |
|---|---|
| public void close() Implements java. Doc from java. Closes this resource, relinquishing any underlying resources.
This method is invoked automatically on objects managed by the
Release any resources used by this walker's reader.
| |
| containsGitModulesFile | back to summary |
|---|---|
| public static boolean containsGitModulesFile(Repository repository) throws IOException Checks whether the working tree contains a .gitmodules file. That's a hint that the repo contains submodules.
| |
| forIndex | back to summary |
|---|---|
| public static SubmoduleWalk forIndex(Repository repository) throws IOException Create a generator to walk over the submodule entries currently in the
index
The
| |
| forPath | back to summary |
|---|---|
| public static SubmoduleWalk forPath(Repository repository, AnyObjectId treeId, String path) throws IOException Create a generator and advance it to the submodule entry at the given path
| |
| forPath | back to summary |
|---|---|
| public static SubmoduleWalk forPath(Repository repository, AbstractTreeIterator iterator, String path) throws IOException Create a generator and advance it to the submodule entry at the given path
| |
| getBuilder | back to summary |
|---|---|
| private BaseRepositoryBuilder | |
| getConfigUpdate | back to summary |
|---|---|
| public String getConfigUpdate() throws IOException, ConfigInvalidException Get the configured update field for current entry. This will be the value from the repository's config.
| |
| getConfigUrl | back to summary |
|---|---|
| public String getConfigUrl() throws IOException, ConfigInvalidException Get the configured remote URL for current entry. This will be the value from the repository's config.
| |
| getDirectory | back to summary |
|---|---|
| public File getDirectory() Get directory that will be the root of the submodule's local repository
| |
| getHead | back to summary |
|---|---|
| public ObjectId getHead() throws IOException Get commit id that HEAD points to in the current submodule's repository
| |
| getHeadRef | back to summary |
|---|---|
| public String getHeadRef() throws IOException Get ref that HEAD points to in the current submodule's repository
| |
| getModuleName | back to summary |
|---|---|
| private String getModuleName(String modulePath) | |
| getModuleName | back to summary |
|---|---|
| public String getModuleName() throws IOException, ConfigInvalidException The module name for the current submodule entry (used for the section name of .git/config)
| |
| getModulesIgnore | back to summary |
|---|---|
| public SubmoduleWalk. Get the configured ignore field for the current entry. This will be the value from the .gitmodules file in the current repository's working tree.
| |
| getModulesPath | back to summary |
|---|---|
| public String getModulesPath() throws IOException, ConfigInvalidException Get the configured path for current entry. This will be the value from the .gitmodules file in the current repository's working tree.
| |
| getModulesUpdate | back to summary |
|---|---|
| public String getModulesUpdate() throws IOException, ConfigInvalidException Get the configured update field for current entry. This will be the value from the .gitmodules file in the current repository's working tree.
| |
| getModulesUrl | back to summary |
|---|---|
| public String getModulesUrl() throws IOException, ConfigInvalidException Get the configured remote URL for current entry. This will be the value from the .gitmodules file in the current repository's working tree.
| |
| getObjectId | back to summary |
|---|---|
| public ObjectId getObjectId() Get object id of current submodule entry
| |
| getPath | back to summary |
|---|---|
| public String getPath() Get path of current submodule entry
| |
| getRemoteUrl | back to summary |
|---|---|
| public String getRemoteUrl() throws IOException, ConfigInvalidException Get the resolved remote URL for the current submodule.
This method resolves the value of
| |
| getRepository | back to summary |
|---|---|
| public Repository getRepository() throws IOException Get repository for current submodule entry
| |
| getSubmoduleDirectory | back to summary |
|---|---|
| public static File getSubmoduleDirectory(final Repository parent, final String path) Get submodule directory
| |
| getSubmoduleRemoteUrl | back to summary |
|---|---|
| public static String getSubmoduleRemoteUrl(final Repository parent, final String url) throws IOException Resolve submodule repository URL. This handles relative URLs that are typically specified in the '.gitmodules' file by resolving them against the remote URL of the parent repository. Relative URLs will be resolved against the parent repository's working directory if the parent repository has no configured remote URL.
| |
| getSubmoduleRepository | back to summary |
|---|---|
| public static Repository getSubmoduleRepository(final Repository parent, final String path) throws IOException Get submodule repository
| |
| getSubmoduleRepository | back to summary |
|---|---|
| public static Repository getSubmoduleRepository(final File parent, final String path) throws IOException Get submodule repository at path
| |
| getSubmoduleRepository | back to summary |
|---|---|
| public static Repository getSubmoduleRepository(final File parent, final String path, FS fs) throws IOException Get submodule repository at path, using the specified file system abstraction
| |
| getSubmoduleRepository | back to summary |
|---|---|
| public static Repository getSubmoduleRepository(File parent, String path, FS fs, BaseRepositoryBuilder<?, ? extends Repository> builder) throws IOException Get submodule repository at path, using the specified file system abstraction and the specified builder
| |
| lazyLoadModulesConfig | back to summary |
|---|---|
| private void lazyLoadModulesConfig() throws IOException, ConfigInvalidException | |
| loadModulesConfig | back to summary |
|---|---|
| public SubmoduleWalk loadModulesConfig() throws IOException, ConfigInvalidException Load the config for this walk from
Uses the root tree if If no submodule config is found, loads an empty config.
| |
| loadPathNames | back to summary |
|---|---|
| private void loadPathNames() | |
| next | back to summary |
|---|---|
| public boolean next() throws IOException Advance to next submodule in the index tree.
The object id and path of the next entry can be obtained by calling
| |
| reset | back to summary |
|---|---|
| public SubmoduleWalk reset() Reset generator and start new submodule walk
| |
| setBuilderFactory | back to summary |
|---|---|
| public void setBuilderFactory(RepositoryBuilderFactory factory) Sets the
| |
| setFilter | back to summary |
|---|---|
| public SubmoduleWalk setFilter(TreeFilter filter) Set tree filter
| |
| setModulesConfig | back to summary |
|---|---|
| public SubmoduleWalk setModulesConfig(Config config) Set the config used by this walk. This method need only be called if constructing a walk manually instead of with one of the static factory methods above.
| |
| setRootTree | back to summary |
|---|---|
| public SubmoduleWalk setRootTree(AbstractTreeIterator tree) Set the tree used by this walk for finding The root tree is not read until the first submodule is encountered by the walk. This method need only be called if constructing a walk manually instead of with one of the static factory methods above.
| |
| setRootTree | back to summary |
|---|---|
| public SubmoduleWalk setRootTree(AnyObjectId id) throws IOException Set the tree used by this walk for finding The root tree is not read until the first submodule is encountered by the walk. This method need only be called if constructing a walk manually instead of with one of the static factory methods above.
| |
| setTree | back to summary |
|---|---|
| public SubmoduleWalk setTree(AbstractTreeIterator iterator) throws CorruptObjectException Set the tree iterator used for finding submodule entries
| |
| setTree | back to summary |
|---|---|
| public SubmoduleWalk setTree(AnyObjectId treeId) throws IOException Set the tree used for finding submodule entries
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final SubmoduleWalk. | ALL
Ignore all modifications to submodules |
| public static final SubmoduleWalk. | DIRTY
Ignore changes to the working tree of a submodule |
| public static final SubmoduleWalk. | NONE
Ignore nothing. |
| public static final SubmoduleWalk. | UNTRACKED
Ignore changes to untracked files in the working tree of a submodule |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static SubmoduleWalk. | |
| public static SubmoduleWalk. |
| ALL | back to summary |
|---|---|
| public static final SubmoduleWalk. Ignore all modifications to submodules | |
| DIRTY | back to summary |
|---|---|
| public static final SubmoduleWalk. Ignore changes to the working tree of a submodule | |
| NONE | back to summary |
|---|---|
| public static final SubmoduleWalk. Ignore nothing. That's the default | |
| UNTRACKED | back to summary |
|---|---|
| public static final SubmoduleWalk. Ignore changes to untracked files in the working tree of a submodule | |
| IgnoreSubmoduleMode | back to summary |
|---|---|
| private IgnoreSubmoduleMode() | |
| valueOf | back to summary |
|---|---|
| public static SubmoduleWalk. | |
| values | back to summary |
|---|---|
| public static SubmoduleWalk. | |