libgit2

git_submodule_set_ignore

Version:

Set the ignore rule for the submodule.

This sets the in-memory ignore rule for the submodule which will control the behavior of git_submodule_status().

To make changes persistent, call git_submodule_save() to write the value to disk (in the ".gitmodules" and ".git/config" files).

Call with GIT_SUBMODULE_IGNORE_RESET or call git_submodule_reload() to revert the in-memory rule to the value that is on disk.

Signature

git_submodule_ignore_t git_submodule_set_ignore(git_submodule *submodule, git_submodule_ignore_t ignore);

Parameters

In
submodule

The submodule to update

In
ignore

The new value for the ignore rule

Returns

old value for ignore

Versions