libgit2

git_blame_file_from_buffer

Version:

Get the blame for a single file in the repository, using the specified buffer contents as the uncommitted changes of the file (the working directory contents).

Signature

int git_blame_file_from_buffer(git_blame **out, git_repository *repo, const char *path, const char *contents, size_t contents_len, git_blame_options *options);

Parameters

In
out

pointer that will receive the blame object

In
repo

repository whose history is to be walked

const char *
In
path

path to file to consider

const char *
In
contents

the uncommitted changes

size_t
In
contents_len

the length of the changes buffer

In
options

options for the blame operation or NULL

Returns

int

0 on success, or an error code

Versions