Method
GgitBlamefrom_buffer
Declaration [src]
GgitBlame*
ggit_blame_from_buffer (
GgitBlame* blame,
const guint8* buffer,
gsize buffer_length,
GError** error
)
Description [src]
Get blame data for a file that has been modified in memory. blame 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 expensitve), updating the buffer
blame is very fast.
Lines that differ between the buffer and the committed version are marked as having a zero id for their #ggit_blame_hunk_get_final_commit_id.
Parameters
buffer-
Type: An array of
guint8The contents of the file.
The length of the array is specified in the buffer_lengthargument.The data is owned by the caller of the method. buffer_length-
Type:
gsizeThe length of the buffer.
error-
Type:
GError **The return location for a recoverable error.
The argument can be NULL.If the return location is not NULL, then you must initialize it to aNULLGError*.The argument will be left initialized to NULLby the method if there are no errors.In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.
Return value
Type: GgitBlame
A GgitBlame or NULL.
| The caller of the method takes ownership of the returned data, and is responsible for freeing it. |
The return value can be NULL. |