libgit2

git_status_file

Version:

Get file status for a single file.

This is not quite the same as calling git_status_foreach_ext() with the pathspec set to the specified path.

Signature

int git_status_file(unsigned int *status_flags, git_repository *repo, const char *path);

Parameters

unsigned int *
In
status_flags

The status value for the file

In
repo

A repository object

const char *
In
path

The file to retrieve status for, rooted at the repo's workdir

Returns

int

0 on success, GIT_ENOTFOUND if the file is not found in the HEAD, index, and work tree, GIT_EINVALIDPATH if path points at a folder, GIT_EAMBIGUOUS if "path" matches multiple files, -1 on other error.

Versions