Diff
Object Hierarchy:
Description:
Represents a diff list.
Namespace: Ggit
Package: libgit2-glib-1.0
Content:
Properties:
- public Repository repository { owned get; construct; }
Static methods:
- public static void blob_to_buffer (Blob? old_blob, string? old_as_path, uint8[]? buffer, string? buffer_as_path, DiffOptions? diff_options, DiffFileCallback? file_cb, DiffBinaryCallback? binary_cb, DiffHunkCallback? hunk_cb, DiffLineCallback? line_cb) throws Error
Same as blobs but using a buffer.
- public static void blobs (Blob? old_blob, string? old_as_path, Blob? new_blob, string? new_as_path, DiffOptions? diff_options, DiffFileCallback? file_cb, DiffBinaryCallback? binary_cb, DiffHunkCallback? hunk_cb, DiffLineCallback? line_cb) throws Error
Iterates over the diff calling
file_cb
,binary_cb
,hunk_cb
andline_cb
.
Creation methods:
- protected Diff ()
- public Diff.buffers (uint8[]? buffer1, string? buffer1_as_path, uint8[]? buffer2, string? buffer2_as_path, DiffOptions? diff_options) throws Error
Same as blobs but using a buffers.
- public Diff.index_to_workdir (Repository repository, Index? index, DiffOptions? diff_options) throws Error
Creates a Diff which compares the working directory and the index.
- public Diff.tree_to_index (Repository repository, Tree? old_tree, Index? index, DiffOptions? diff_options) throws Error
Creates a Diff which compares
old_tree
and the index. - public Diff.tree_to_tree (Repository repository, Tree? old_tree, Tree? new_tree, DiffOptions? diff_options) throws Error
Creates a Diff which compares
old_tree
andnew_tree
. - public Diff.tree_to_workdir (Repository repository, Tree? old_tree, DiffOptions? diff_options) throws Error
Creates a Diff which compares the working directory and
old_tree
.
Methods:
- public void @foreach (DiffFileCallback? file_cb, DiffBinaryCallback? binary_cb, DiffHunkCallback? hunk_cb, DiffLineCallback? line_cb) throws Error
Iterates over the diff calling
file_cb
,binary_cb
,hunk_cb
andline_cb
. - public bool find_similar (DiffFindOptions? options) throws Error
Transform this marking file renames, copies, etc.
- public string? format_email (DiffFormatEmailOptions options) throws Error
Create an e-mail ready patch from a diff.
- public DiffDelta? get_delta (size_t index)
Get the delta at the specified index.
- public size_t get_num_deltas ()
Get the number of deltas in the diff.
- public void merge (Diff from) throws Error
Merges
from
into this unless throws is set. - public void print (DiffFormatType type, DiffLineCallback print_cb) throws Error
Iterates over this generating text output like "git diff".
Inherited Members:
All known members inherited from class Ggit.Native
All known members inherited from class GLib.Object