- lg2_add
int lg2_add(libgit2.types.git_repository* repo, int argc, char** argv)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- print_matched_cb
int print_matched_cb(const(char)* path, const(char)* matched_pathspec, void* payload)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
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.