git_blame_buffer

Get blame data for a file that has been modified in memory. The reference parameter is a pre-calculated blame for the in-odb history of the file. This means that once a file blame is completed (which can be expensive), updating the buffer blame is very fast.

Lines that differ between the buffer and the committed version are marked as having a zero OID for their final_commit_id.

extern (C) nothrow @nogc
int
git_blame_buffer
(,,
const(char)* buffer
,
size_t buffer_len
)

Parameters

out_ .git_blame**

pointer that will receive the resulting blame data

reference .git_blame*

cached blame from the history of the file (usually the output from git_blame_file)

buffer const(char)*

the (possibly) modified contents of the file

buffer_len size_t

number of valid bytes in the buffer

Return Value

Type: int

0 on success, or an error code. (use git_error_last for information about the error)

Meta