update


Description:

public void update (bool init, SubmoduleUpdateOptions options) throws Error

Update a submodule.

This will clone a missing submodule and checkout the subrepository to the commit specified in the index of the containing repository. If the submodule repository doesn't contain the target commit (e.g. because fetchRecurseSubmodules isn't set), then the submodule is fetched using the fetch options supplied in options.

Parameters:

this

a Submodule.

init

If the submodule is not initialized, setting this flag to true will initialize the submodule before updating. Otherwise, this will return an error if attempting to update an uninitialzed repository. but setting this to true forces them to be updated.

options

a SubmoduleUpdateOptions object.