Ggit.Blame

g GObject.Object GObject.Object Ggit.ObjectFactoryBase Ggit.ObjectFactoryBase GObject.Object->Ggit.ObjectFactoryBase Ggit.Blame Ggit.Blame Ggit.Native Ggit.Native Ggit.Native->Ggit.Blame Ggit.ObjectFactoryBase->Ggit.Native

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

get_flags (blame_options)

class

set_flags (blame_options, flags)

from_buffer (buffer)

get_hunk_by_index (idx)

get_hunk_by_line (line)

get_hunk_count ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

Ggit.Native (1)

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Ggit.Blame(**kwargs)
Bases:

Ggit.Native

Abstract:

No

Structure:

Ggit.BlameClass

Represents a blame.

classmethod get_flags(blame_options)
Parameters:

blame_options (Ggit.BlameOptions) – a Ggit.BlameOptions.

Returns:

a Ggit.BlameFlags.

Return type:

Ggit.BlameFlags

Get the blame options flags.

classmethod set_flags(blame_options, flags)
Parameters:

Set the blame options flags.

from_buffer(buffer)
Parameters:

buffer (bytes) – the contents of the file.

Raises:

GLib.Error

Returns:

a Ggit.Blame or None.

Return type:

Ggit.Blame or None

Get blame data for a file that has been modified in memory. self 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.BlameHunk.get_final_commit_id.

get_hunk_by_index(idx)
Parameters:

idx (int) –

Return type:

Ggit.BlameHunk

get_hunk_by_line(line)
Parameters:

line (int) –

Return type:

Ggit.BlameHunk

get_hunk_count()
Return type:

int