libgit2

git_status_opt_t

Version:

Flags to control status callbacks

  • GIT_STATUS_OPT_INCLUDE_UNTRACKED says that callbacks should be made on untracked files. These will only be made if the workdir files are included in the status "show" option.
  • GIT_STATUS_OPT_INCLUDE_IGNORED says that ignored files should get callbacks. Again, these callbacks will only be made if the workdir files are included in the status "show" option. Right now, there is no option to include all files in directories that are ignored completely.
  • GIT_STATUS_OPT_INCLUDE_UNMODIFIED indicates that callback should be made even on unmodified files.
  • GIT_STATUS_OPT_EXCLUDE_SUBMODULES indicates that directories which appear to be submodules should just be skipped over.
  • GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS indicates that the contents of untracked directories should be included in the status. Normally if an entire directory is new, then just the top-level directory will be included (with a trailing slash on the entry name). Given this flag, the directory itself will not be included, but all the files in it will.
  • GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH indicates that the given path will be treated as a literal path, and not as a pathspec.
  • GIT_STATUS_OPT_RECURSE_IGNORED_DIRS indicates that the contents of ignored directories should be included in the status. This is like doing git ls-files -o -i --exclude-standard with core git.

Calling git_status_foreach() is like calling the extended version with: GIT_STATUS_OPT_INCLUDE_IGNORED, GIT_STATUS_OPT_INCLUDE_UNTRACKED, and GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS. Those options are bundled together as GIT_STATUS_OPT_DEFAULTS if you want them as a baseline.

Values

GIT_STATUS_OPT_INCLUDE_UNTRACKED
0
GIT_STATUS_OPT_INCLUDE_IGNORED
1
GIT_STATUS_OPT_INCLUDE_UNMODIFIED
2
GIT_STATUS_OPT_EXCLUDE_SUBMODULES
3
GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS
4
GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH
5
GIT_STATUS_OPT_RECURSE_IGNORED_DIRS
6

Versions