libgit2

git_status_file

Version:

Get file status for a single file

Signature

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

Parameters

unsigned int *
In
status_flags

the status value

In
repo

a repository object

const char *
In
path

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

Returns

int

GIT_EINVALIDPATH when path points at a folder, GIT_ENOTFOUND when the file doesn't exist in any of HEAD, the index or the worktree, 0 otherwise

Versions