| Top |  |  |  |  | 
| gint | (*GgitDiffFileCallback) () | 
| gint | (*GgitDiffHunkCallback) () | 
| gint | (*GgitDiffLineCallback) () | 
| GgitDiff * | ggit_diff_new_tree_to_tree () | 
| GgitDiff * | ggit_diff_new_tree_to_index () | 
| GgitDiff * | ggit_diff_new_index_to_workdir () | 
| GgitDiff * | ggit_diff_new_tree_to_workdir () | 
| void | ggit_diff_merge () | 
| void | ggit_diff_foreach () | 
| void | ggit_diff_print () | 
| void | ggit_diff_blobs () | 
| void | ggit_diff_blob_to_buffer () | 
| GgitDiff | |
| struct | GgitDiffClass | 
| enum | GgitDiffFlag | 
| enum | GgitDiffLineType | 
| enum | GgitDiffFormatType | 
| enum | GgitDiffOption | 
gint (*GgitDiffFileCallback) (GgitDiffDelta *delta,gfloat progress,gpointer user_data);
Called for each file.
gint (*GgitDiffHunkCallback) (GgitDiffDelta *delta,GgitDiffHunk *hunk,gpointer user_data);
Called for each hunk.
gint (*GgitDiffLineCallback) (GgitDiffDelta *delta,GgitDiffHunk *hunk,GgitDiffLine *line,gpointer user_data);
Called for each line.
GgitDiff * ggit_diff_new_tree_to_tree (GgitRepository *repository,GgitTree *old_tree,GgitTree *new_tree,GgitDiffOptions *diff_options,GError **error);
Creates a GgitDiff which compares old_tree
 and new_tree
.
If diff_options
 is NULL then the defaults specified in
ggit_diff_options_new() are used.
| repository | ||
| old_tree | a GgitTree to diff from. | [allow-none] | 
| new_tree | a GgitTree to diff to. | [allow-none] | 
| diff_options | a GgitDiffOptions, or  | [allow-none] | 
| error | 
GgitDiff * ggit_diff_new_tree_to_index (GgitRepository *repository,GgitTree *old_tree,GgitIndex *index,GgitDiffOptions *diff_options,GError **error);
Creates a GgitDiff which compares old_tree
 and the index.
If index
 is NULL then repository
 index is used.
If diff_options
 is NULL then the defaults specified in
ggit_diff_options_new() are used.
| repository | ||
| old_tree | a GgitTree to diff from. | [allow-none] | 
| index | [allow-none] | |
| diff_options | a GgitDiffOptions, or  | [allow-none] | 
| error | 
GgitDiff * ggit_diff_new_index_to_workdir (GgitRepository *repository,GgitIndex *index,GgitDiffOptions *diff_options,GError **error);
Creates a GgitDiff which compares the working directory and the index.
If index
 is NULL then repository
 index is used.
If diff_options
 is NULL then the defaults specified in
ggit_diff_options_new() are used.
| repository | ||
| index | [allow-none] | |
| diff_options | a GgitDiffOptions, or  | [allow-none] | 
| error | 
GgitDiff * ggit_diff_new_tree_to_workdir (GgitRepository *repository,GgitTree *old_tree,GgitDiffOptions *diff_options,GError **error);
Creates a GgitDiff which compares the working directory and old_tree
.
If diff_options
 is NULL then the defaults specified in
ggit_diff_options_new() are used.
| repository | ||
| old_tree | a GgitTree to diff from. | [allow-none] | 
| diff_options | a GgitDiffOptions, or  | [allow-none] | 
| error | 
void ggit_diff_merge (GgitDiff *onto,GgitDiff *from,GError **error);
Merges from
 into onto
 unless error
 is set.
void ggit_diff_foreach (GgitDiff *diff,GgitDiffFileCallback file_cb,GgitDiffBinaryCallback binary_cb,GgitDiffHunkCallback hunk_cb,GgitDiffLineCallback line_cb,gpointer *user_data,GError **error);
Iterates over the diff calling file_cb
, binary_cb
, hunk_cb
 and line_cb
.
| diff | a GgitDiff. | |
| file_cb | [allow-none][scope call][closure user_data] | |
| binary_cb | a GgitDiffBinaryCallback. | [allow-none][scope call][closure user_data] | 
| hunk_cb | [allow-none][scope call][closure user_data] | |
| line_cb | [allow-none][scope call][closure user_data] | |
| user_data | callback user data. | |
| error | 
void ggit_diff_print (GgitDiff *diff,GgitDiffFormatType type,GgitDiffLineCallback print_cb,gpointer *user_data,GError **error);
Iterates over diff
 generating text output like "git diff".
| diff | a GgitDiff. | |
| type | ||
| print_cb | [scope call][closure user_data] | |
| user_data | callback user data. | |
| error | 
void ggit_diff_blobs (GgitBlob *old_blob,const gchar *old_as_path,GgitBlob *new_blob,const gchar *new_as_path,GgitDiffOptions *diff_options,GgitDiffFileCallback file_cb,GgitDiffBinaryCallback binary_cb,GgitDiffHunkCallback hunk_cb,GgitDiffLineCallback line_cb,gpointer *user_data,GError **error);
Iterates over the diff calling file_cb
, binary_cb
, hunk_cb
 and line_cb
.
The GgitDiffFile mode always be 0, path will be NULL and when a blob is
NULL the oid will be 0.
If diff_options
 is NULL then the defaults specified in
ggit_diff_options_new() are used.
| old_blob | a GgitBlob to diff from. | [allow-none] | 
| old_as_path | treat  | [allow-none] | 
| new_blob | a GgitBlob to diff to. | [allow-none] | 
| new_as_path | treat  | [allow-none] | 
| diff_options | a GgitDiffOptions, or  | [allow-none] | 
| file_cb | [allow-none][scope call][closure user_data] | |
| binary_cb | a GgitDiffBinaryCallback. | [allow-none][scope call][closure user_data] | 
| hunk_cb | [allow-none][scope call][closure user_data] | |
| line_cb | [allow-none][scope call][closure user_data] | |
| user_data | callback user data. | |
| error | 
void ggit_diff_blob_to_buffer (GgitBlob *old_blob,const gchar *old_as_path,const guint8 *buffer,gssize buffer_len,const gchar *buffer_as_path,GgitDiffOptions *diff_options,GgitDiffFileCallback file_cb,GgitDiffBinaryCallback binary_cb,GgitDiffHunkCallback hunk_cb,GgitDiffLineCallback line_cb,gpointer user_data,GError **error);
Same as ggit_diff_blobs() but using a buffer.
| old_blob | a GgitBlob to diff from. | [allow-none] | 
| old_as_path | treat  | [allow-none] | 
| buffer | a buffer to diff to. | [allow-none][array length=buffer_len] | 
| buffer_len | length of  | |
| buffer_as_path | treat  | [allow-none] | 
| diff_options | a GgitDiffOptions, or  | [allow-none] | 
| file_cb | [allow-none][scope call][closure user_data] | |
| binary_cb | a GgitDiffBinaryCallback. | [allow-none][scope call][closure user_data] | 
| hunk_cb | [allow-none][scope call][closure user_data] | |
| line_cb | [allow-none][scope call][closure user_data] | |
| user_data | callback user data. | |
| error | 
These values describe where a line came from and will be passed to the GgitDiffLineCallback when iterating over a diff.
The GGIT_DIFF_LINE_FILE_HDR, GGIT_DIFF_LINE_HUNK_HDR and GGIT_DIFF_LINE_BINARY values are only sent when the diff is being printed.
How the diff should be generated.
| normal. | ||
| reverse the sides of the diff. | ||
| include ignored files. | ||
| also add all files under ignored dirs. | ||
| include untracked files. | ||
| recurse to untracked directories. | ||
| include unmodified files. | ||
| enable generation of typechange detal records. | ||
| try to label tree transitions as type changes. | ||
| ignore file mode changes. | ||
| ignore submodules. | ||
| use case insensitive filename comparison. | ||
| use exact path matching. | ||
| disable updating the binary flag in delta records. | ||
| immediately label untracked directories as untracked, without checking inside. | ||
| force text. | ||
| treat all files as binary, disabling text diffs. | ||
| ignore whitespace. | ||
| ignore whitespace change. | ||
| ignore whitespace at end-of-line. | ||
| include content of untracked files. this implies GGIT_DIFF_INCLUDE_UNTRACKED but not GGIT_DIFF_RECURSE_UNTRACKED_DIRS. | ||
| show unmodified files. | ||
| generate using the "patience diff" algorithm. | ||
| take extra time to find minimal diff. | ||
| include deflate/delta information for binary files. | 
“repository” property“repository” GgitRepository *
Repository.
Flags: Read / Write / Construct Only