Ggit.BlameHunk

Fields

None

Methods

get_final_commit_id ()

get_final_signature ()

get_final_start_line_number ()

get_lines_in_hunk ()

get_orig_commit_id ()

get_orig_path ()

get_orig_signature ()

get_orig_start_line_number ()

is_boundary ()

ref ()

unref ()

Details

class Ggit.BlameHunk

Represents a blame hunk.

get_final_commit_id()
Returns:

a Ggit.OId or None.

Return type:

Ggit.OId or None

Get the id of the commit where this hunk was last changed.

get_final_signature()
Returns:

a Ggit.Signature or None.

Return type:

Ggit.Signature or None

Get the signature of the final version of the hunk.

get_final_start_line_number()
Returns:

the final hunk line number.

Return type:

int

Get the line number where the hunk begins in the final version of the file. Line numbers start at 1.

get_lines_in_hunk()
Returns:

the number of lines in the hunk.

Return type:

int

Get the number of lines in the hunk.

get_orig_commit_id()
Returns:

a Ggit.OId or None.

Return type:

Ggit.OId or None

Get the id of the commit where the hunk was found. This is usually the same the final commit id, except when #GGIT_BLAME_TRACK_COPIES_ANY_COMMIT was used.

get_orig_path()
Returns:

the path or None.

Return type:

str or None

Get the path of the file where this hunk originated, as of the commit specified by Ggit.BlameHunk.get_orig_commit_id.

get_orig_signature()
Returns:

a Ggit.Signature or None.

Return type:

Ggit.Signature or None

Get the signature of the commit specified by Ggit.BlameHunk.get_orig_commit_id.

get_orig_start_line_number()
Returns:

the orig hunk line number.

Return type:

int

Get the line number where the hunk begins in the file specified by Ggit.BlameHunk.get_orig_path at the commit specified by Ggit.BlameHunk.get_orig_commit_id. Line numbers start at 1.

is_boundary()
Returns:

whether the hunk is at a boundary commit.

Return type:

bool

Get whether the hunk has been tracked to a boundary commit (the root, or the commit specified in Ggit.BlameOptions.set_oldest_commit).

ref()
Returns:

a Ggit.BlameHunk or None.

Return type:

Ggit.BlameHunk or None

Atomically increments the reference count of self by one. This function is MT-safe and may be called from any thread.

unref()

Atomically decrements the reference count of self by one. If the reference count drops to 0, self is freed.