Get file status for a single file.
This tries to get status for the filename that you give. If no files match that name (in either the HEAD, index, or working directory), this returns GIT_ENOTFOUND.
If the name matches multiple files (for example, if the path
names a
directory or if running on a case- insensitive filesystem and yet the
HEAD has two entries that both match the path), then this returns
GIT_EAMBIGUOUS because it cannot give correct results.
This does not do any sort of rename detection. Renames require a set of
targets and because of the path filtering, there is not enough
information to check renames correctly. To check file status with rename
detection, there is no choice but to do a full git_status_list_new
and
scan through looking for the path that you are interested in.
Output combination of git_status_t values for file
The file to retrieve status for relative to the repo workdir
0 on success, GIT_ENOTFOUND if the file is not found in the HEAD, index, and work tree, GIT_EAMBIGUOUS if path
matches multiple files or if it refers to a folder, and -1 on other errors.