Ggit.Submodule.update

### Method

# Ggit Submoduleupdate

#### Declaration [src]

    void
    ggit_submodule_update (
      GgitSubmodule* submodule,
      gboolean init,
      GgitSubmoduleUpdateOptions* options,
      GError** error
    )

#### Description [src]

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

`init` | `gboolean`
| 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` | `GgitSubmoduleUpdateOptions`
| A `GgitSubmoduleUpdateOptions` object.
| The data is owned by the caller of the function.
`error` | `GError **`
| The return location for a `GError*`, or `NULL`.