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 An array of guint8
 

The contents of the file.

 The length of the array is specified in the buffer_length argument.
 The data is owned by the caller of the function.
buffer_length gsize
 

The length of the buffer.

error GError **
  The return location for a GError*, or NULL.

Return value

Returns: GgitBlame
 

A GgitBlame or NULL.

 The caller of the method takes ownership of the data, and is responsible for freeing it.
 The return value can be NULL.