libgit2

git_submodule_set_update

Version:

Set the update rule for the submodule.

The initial value comes from the ".git/config" setting of submodule.$name.update for this submodule (which is initialized from the ".gitmodules" file). Using this function sets the update rule in memory for the submodule. Call git_submodule_save() to write out the new update rule.

Calling this again with GIT_SUBMODULE_UPDATE_RESET or calling git_submodule_reload() will revert the rule to the on disk value.

Signature

git_submodule_update_t git_submodule_set_update(git_submodule *submodule, git_submodule_update_t update);

Parameters

In
submodule

The submodule to update

In
update

The new value to use

Returns

old value for update

Versions