Ggit.BlameHunk¶
Fields¶
None
Methods¶
|
|
|
|
|
Details¶
- class Ggit.BlameHunk¶
Represents a blame hunk.
- get_final_commit_id()¶
-
Get the id of the commit where this hunk was last changed.
- get_final_signature()¶
- Returns:
a
Ggit.Signature
orNone
.- Return type:
Get the signature of the final version of the hunk.
- get_final_start_line_number()¶
- Returns:
the final hunk line number.
- Return type:
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:
Get the number of lines in the hunk.
- get_orig_commit_id()¶
-
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()¶
-
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
orNone
.- Return type:
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:
Get the line number where the hunk begins in the file specified by
Ggit.BlameHunk.get_orig_path
at the commit specified byGgit.BlameHunk.get_orig_commit_id
. Line numbers start at 1.
- is_boundary()¶
- Returns:
whether the hunk is at a boundary commit.
- Return type:
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
orNone
.- Return type:
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.