Top Description Fields Constructors Methods
org.eclipse.jgit.api

public Class SubmoduleInitCommand

extends GitCommand<Collection<String>>
Class Inheritance
Imports
java.io.IOException, java.util.ArrayList, .Collection, .List, org.eclipse.jgit.api.errors.GitAPIException, .JGitInternalException, org.eclipse.jgit.errors.ConfigInvalidException, org.eclipse.jgit.lib.ConfigConstants, .Repository, .StoredConfig, org.eclipse.jgit.submodule.SubmoduleWalk, org.eclipse.jgit.treewalk.filter.PathFilterGroup

A class used to execute a submodule init command. This will copy the 'url' and 'update' fields from the working tree .gitmodules file to a repository's config file for each submodule not currently present in the repository's config file.
See Also
Git documentation about submodules

Field Summary

Modifier and TypeField and Description
private final Collection<String>
Inherited from org.eclipse.jgit.api.GitCommand:
repo

Constructor Summary

AccessConstructor and Description
public
SubmoduleInitCommand(Repository repo)

Constructor for SubmoduleInitCommand.

Method Summary

Modifier and TypeMethod and Description
public SubmoduleInitCommand

Returns:

this command
addPath
(String
(with / as separator)
path
)

Add repository-relative submodule path to initialize

public Collection<String>
call()

Implements abstract org.eclipse.jgit.api.GitCommand.call.

Implements java.util.concurrent.Callable.call.

Computes a result, or throws an exception if unable to do so.

Inherited from org.eclipse.jgit.api.GitCommand:
checkCallablegetRepositorysetCallable

Field Detail

pathsback to summary
private final Collection<String> paths

Constructor Detail

SubmoduleInitCommandback to summary
public SubmoduleInitCommand(Repository repo)

Constructor for SubmoduleInitCommand.

Parameters
repo:Repository

a org.eclipse.jgit.lib.Repository object.

Method Detail

addPathback to summary
public SubmoduleInitCommand addPath(String path)

Add repository-relative submodule path to initialize

Parameters
path:String

(with / as separator)

Returns:SubmoduleInitCommand

this command

callback to summary
public Collection<String> call() throws GitAPIException

Implements abstract org.eclipse.jgit.api.GitCommand.call.

Implements java.util.concurrent.Callable.call.

Doc from org.eclipse.jgit.api.GitCommand.call.

Computes a result, or throws an exception if unable to do so.

Execute the command

Returns:Collection<String>

Doc from java.util.concurrent.Callable.call.

computed result

Annotations
@Override