|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jgit.submodule.SubmoduleWalk
public class SubmoduleWalk
Walker that visits all submodule entries found in a tree
Constructor Summary | |
---|---|
SubmoduleWalk(Repository repository)
Create submodule generator |
Method Summary | |
---|---|
static SubmoduleWalk |
forIndex(Repository repository)
Create a generator to walk over the submodule entries currently in the index |
static SubmoduleWalk |
forPath(Repository repository,
AbstractTreeIterator iterator,
String path)
Create a generator and advance it to the submodule entry at the given path |
static SubmoduleWalk |
forPath(Repository repository,
AnyObjectId treeId,
String path)
Create a generator and advance it to the submodule entry at the given path |
String |
getConfigUpdate()
Get the configured update field for current entry. |
String |
getConfigUrl()
Get the configured remote URL for current entry. |
File |
getDirectory()
Get directory that will be the root of the submodule's local repository |
ObjectId |
getHead()
Get commit id that HEAD points to in the current submodule's repository |
String |
getHeadRef()
Get ref that HEAD points to in the current submodule's repository |
String |
getModulesPath()
Get the configured path for current entry. |
String |
getModulesUpdate()
Get the configured update field for current entry. |
String |
getModulesUrl()
Get the configured remote URL for current entry. |
ObjectId |
getObjectId()
Get object id of current submodule entry |
String |
getPath()
Get path of current submodule entry |
String |
getRemoteUrl()
Get the resolved remote URL for the current submodule. |
Repository |
getRepository()
Get repository for current submodule entry |
static File |
getSubmoduleDirectory(Repository parent,
String path)
Get submodule directory |
static String |
getSubmoduleRemoteUrl(Repository parent,
String url)
Resolve submodule repository URL. |
static Repository |
getSubmoduleRepository(File parent,
String path)
Get submodule repository at path |
static Repository |
getSubmoduleRepository(Repository parent,
String path)
Get submodule repository |
boolean |
next()
Advance to next submodule in the index tree. |
SubmoduleWalk |
reset()
Reset generator and start new submodule walk |
SubmoduleWalk |
setFilter(TreeFilter filter)
Set tree filter |
SubmoduleWalk |
setTree(AbstractTreeIterator iterator)
Set the tree iterator used for finding submodule entries |
SubmoduleWalk |
setTree(AnyObjectId treeId)
Set the tree used for finding submodule entries |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SubmoduleWalk(Repository repository) throws IOException
repository
-
IOException
Method Detail |
---|
public static SubmoduleWalk forIndex(Repository repository) throws IOException
repository
-
IOException
public static SubmoduleWalk forPath(Repository repository, AnyObjectId treeId, String path) throws IOException
repository
- treeId
- path
-
IOException
public static SubmoduleWalk forPath(Repository repository, AbstractTreeIterator iterator, String path) throws IOException
repository
- iterator
- path
-
IOException
public static File getSubmoduleDirectory(Repository parent, String path)
parent
- path
-
public static Repository getSubmoduleRepository(Repository parent, String path) throws IOException
parent
- path
-
IOException
public static Repository getSubmoduleRepository(File parent, String path) throws IOException
parent
- path
-
IOException
public static String getSubmoduleRemoteUrl(Repository parent, String url) throws IOException
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.
parent
- parent repositoryurl
- absolute or relative URL of the submodule repository
IOException
public SubmoduleWalk setFilter(TreeFilter filter)
filter
-
public SubmoduleWalk setTree(AbstractTreeIterator iterator) throws CorruptObjectException
iterator
-
CorruptObjectException
public SubmoduleWalk setTree(AnyObjectId treeId) throws IOException
treeId
-
IOException
IncorrectObjectTypeException
MissingObjectException
public SubmoduleWalk reset()
public File getDirectory()
public boolean next() throws IOException
getObjectId()
and getPath()
.
IOException
public String getPath()
public ObjectId getObjectId()
public String getModulesPath() throws IOException, ConfigInvalidException
ConfigInvalidException
IOException
public String getConfigUrl() throws IOException, ConfigInvalidException
ConfigInvalidException
IOException
public String getModulesUrl() throws IOException, ConfigInvalidException
ConfigInvalidException
IOException
public String getConfigUpdate() throws IOException, ConfigInvalidException
ConfigInvalidException
IOException
public String getModulesUpdate() throws IOException, ConfigInvalidException
ConfigInvalidException
IOException
public Repository getRepository() throws IOException
IOException
public ObjectId getHead() throws IOException
IOException
public String getHeadRef() throws IOException
IOException
public String getRemoteUrl() throws IOException, ConfigInvalidException
This method resolves the value of getModulesUrl()
to an absolute
URL
IOException
ConfigInvalidException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |