Patch
Object Hierarchy:
Description:
[ CCode ( ref_function = "ggit_patch_ref" , type_id = "ggit_patch_get_type ()" , unref_function = "ggit_patch_unref" ) ]
[ Compact ]
public class Patch
Represents a patch object.
Content:
Creation methods:
Methods:
- public unowned Patch? @ref ()
Atomically increments the reference count of
this by one.
- public DiffDelta? get_delta ()
Get the diff delta corresponding to the patch.
- public DiffHunk? get_hunk (size_t idx) throws Error
Get the idx
'th hunk in the patch.
- public bool get_line_stats (out size_t total_context, out size_t total_additions, out size_t total_deletions) throws Error
Get the line statistics of the patch.
- public size_t get_num_hunks ()
Get the number of hunks in the patch.
- public int get_num_lines_in_hunk (size_t hunk)
Get the number of lines in hunk
.
- public bool to_stream (OutputStream stream) throws Error
Write the contents of a patch to the provided stream.
- public string? to_string () throws Error
Gets the content of a patch as a single diff text.
- public void unref ()
Atomically decrements the reference count of
this by one.