Submodule update values
These values represent settings for the submodule.$name.update
configuration value which says how to handle git submodule update
for
this submodule. The value is usually set in the ".gitmodules" file and
copied to ".git/config" when the submodule is initialized.
You can override this setting on a per-submodule basis with
git_submodule_set_update()
and write the changed value to disk using
git_submodule_save()
. If you have overwritten the value, you can
revert it by passing GIT_SUBMODULE_UPDATE_RESET
to the set function.
The values are:
- GIT_SUBMODULE_UPDATE_CHECKOUT: the default; when a submodule is
updated, checkout the new detached HEAD to the submodule directory.
- GIT_SUBMODULE_UPDATE_REBASE: update by rebasing the current checked
out branch onto the commit from the superproject.
- GIT_SUBMODULE_UPDATE_MERGE: update by merging the commit in the
superproject into the current checkout out branch of the submodule.
- GIT_SUBMODULE_UPDATE_NONE: do not update this submodule even when
the commit in the superproject is updated.
- GIT_SUBMODULE_UPDATE_DEFAULT: not used except as static initializer
when we don't want any particular update rule to be specified.
GIT_SUBMODULE_UPDATE_CHECKOUT
1
GIT_SUBMODULE_UPDATE_REBASE
2
GIT_SUBMODULE_UPDATE_MERGE
3
GIT_SUBMODULE_UPDATE_NONE
4
GIT_SUBMODULE_UPDATE_DEFAULT
0