index_mode

The following example demonstrates how to add files with libgit2.

It will use the repository in the current working directory, and act on files passed as its parameters.

Recognized options are: -v/--verbose: show the file's status after acting on it. -n/--dry-run: do not actually change the index. -u/--update: update the index instead of adding to it.

Values

ValueMeaning
INDEX_NONE
INDEX_ADD

Meta