git_index_update_all

Update all index entries to match the working directory

This method will fail in bare index instances.

This scans the existing index entries and synchronizes them with the working directory, deleting them if the corresponding working directory file no longer exists otherwise updating the information (including adding the latest version of file to the ODB if needed).

If you provide a callback function, it will be invoked on each matching item in the index immediately *before* it is updated (either refreshed or removed depending on working directory state). Return 0 to proceed with updating the item, > 0 to skip the item, and < 0 to abort the scan.

Parameters

index libgit2_d.types.git_index*

An existing index object

pathspec const(libgit2_d.strarray.git_strarray)*

array of path patterns

callback .git_index_matched_path_cb

notification callback for each updated path (also gets index of matching pathspec entry); can be null; return 0 to add, >0 to skip, <0 to abort scan.

payload void*

payload passed through to callback function

Return Value

Type: int

0 on success, negative callback return value, or error code

Meta