libgit2_d.diff

Undocumented in source.

Members

Aliases

git_diff_binary_cb
alias git_diff_binary_cb = int function(const(.git_diff_delta)* delta, const(.git_diff_binary)* binary, void* payload)

When iterating over a diff, callback that will be made for binary content within the diff.

git_diff_file_cb
alias git_diff_file_cb = int function(const(.git_diff_delta)* delta, float progress, void* payload)

When iterating over a diff, callback that will be made per file.

git_diff_hunk_cb
alias git_diff_hunk_cb = int function(const(.git_diff_delta)* delta, const(.git_diff_hunk)* hunk, void* payload)

When iterating over a diff, callback that will be made per hunk.

git_diff_line_cb
alias git_diff_line_cb = int function(const(.git_diff_delta)* delta, const(.git_diff_hunk)* hunk, const(.git_diff_line)* line, void* payload)

When iterating over a diff, callback that will be made per text diff line. In this context, the provided range will be null.

git_diff_notify_cb
alias git_diff_notify_cb = int function(const(.git_diff)* diff_so_far, const(.git_diff_delta)* delta_to_add, const(char)* matched_pathspec, void* payload)

Diff notification callback function.

git_diff_progress_cb
alias git_diff_progress_cb = int function(const(.git_diff)* diff_so_far, const(char)* old_path, const(char)* new_path, void* payload)

Diff progress callback.

Enums

git_delta_t
enum git_delta_t

What type of change is described by a git_diff_delta?

git_diff_binary_t
enum git_diff_binary_t

Structure describing the binary contents of a diff.

git_diff_find_t
enum git_diff_find_t

Flags to control the behavior of diff rename/copy detection.

git_diff_flag_t
enum git_diff_flag_t

Flags for the delta object and the file objects on each side.

git_diff_format_email_flags_t
enum git_diff_format_email_flags_t

Formatting options for diff e-mail generation

git_diff_format_t
enum git_diff_format_t

Possible output formats for diff data

git_diff_line_t
enum git_diff_line_t

Line origin constants.

git_diff_option_t
enum git_diff_option_t

Flags for diff options. A combination of these flags can be passed in via the flags value in the git_diff_options.

git_diff_stats_format_t
enum git_diff_stats_format_t

Formatting options for diff stats

Functions

GIT_DIFF_FIND_OPTIONS_INIT
GIT_DIFF_FIND_OPTIONS_INIT()
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT
GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT()
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
GIT_DIFF_OPTIONS_INIT
GIT_DIFF_OPTIONS_INIT()
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
GIT_DIFF_PATCHID_OPTIONS_INIT
GIT_DIFF_PATCHID_OPTIONS_INIT()
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
git_diff_blob_to_buffer
int git_diff_blob_to_buffer(const(libgit2_d.types.git_blob)* old_blob, const(char)* old_as_path, const(char)* buffer, size_t buffer_len, const(char)* buffer_as_path, const(.git_diff_options)* options, .git_diff_file_cb file_cb, .git_diff_binary_cb binary_cb, .git_diff_hunk_cb hunk_cb, .git_diff_line_cb line_cb, void* payload)

Directly run a diff between a blob and a buffer.

git_diff_blobs
int git_diff_blobs(const(libgit2_d.types.git_blob)* old_blob, const(char)* old_as_path, const(libgit2_d.types.git_blob)* new_blob, const(char)* new_as_path, const(.git_diff_options)* options, .git_diff_file_cb file_cb, .git_diff_binary_cb binary_cb, .git_diff_hunk_cb hunk_cb, .git_diff_line_cb line_cb, void* payload)

Directly run a diff on two blobs.

git_diff_buffers
int git_diff_buffers(const(void)* old_buffer, size_t old_len, const(char)* old_as_path, const(void)* new_buffer, size_t new_len, const(char)* new_as_path, const(.git_diff_options)* options, .git_diff_file_cb file_cb, .git_diff_binary_cb binary_cb, .git_diff_hunk_cb hunk_cb, .git_diff_line_cb line_cb, void* payload)

Directly run a diff between two buffers.

git_diff_commit_as_email
int git_diff_commit_as_email(libgit2_d.buffer.git_buf* out_, libgit2_d.types.git_repository* repo, libgit2_d.types.git_commit* commit, size_t patch_no, size_t total_patches, uint flags, const(.git_diff_options)* diff_opts)

Create an e-mail ready patch for a commit.

git_diff_find_options_init
int git_diff_find_options_init(.git_diff_find_options* opts, uint version_)

Initialize git_diff_find_options structure

git_diff_find_similar
int git_diff_find_similar(.git_diff* diff, const(.git_diff_find_options)* options)

Transform a diff marking file renames, copies, etc.

git_diff_foreach
int git_diff_foreach(.git_diff* diff, .git_diff_file_cb file_cb, .git_diff_binary_cb binary_cb, .git_diff_hunk_cb hunk_cb, .git_diff_line_cb line_cb, void* payload)

Loop over all deltas in a diff issuing callbacks.

git_diff_format_email
int git_diff_format_email(libgit2_d.buffer.git_buf* out_, .git_diff* diff, const(.git_diff_format_email_options)* opts)

Create an e-mail ready patch from a diff.

git_diff_format_email_options_init
int git_diff_format_email_options_init(.git_diff_format_email_options* opts, uint version_)

Initialize git_diff_format_email_options structure

git_diff_free
void git_diff_free(.git_diff* diff)

Deallocate a diff.

git_diff_from_buffer
int git_diff_from_buffer(.git_diff** out_, const(char)* content, size_t content_len)

Read the contents of a git patch file into a git_diff object.

git_diff_get_delta
const(.git_diff_delta)* git_diff_get_delta(const(.git_diff)* diff, size_t idx)

Return the diff delta for an entry in the diff list.

git_diff_get_stats
int git_diff_get_stats(.git_diff_stats** out_, .git_diff* diff)

Accumulate diff statistics for all patches.

git_diff_index_to_index
int git_diff_index_to_index(.git_diff** diff, libgit2_d.types.git_repository* repo, libgit2_d.types.git_index* old_index, libgit2_d.types.git_index* new_index, const(.git_diff_options)* opts)

Create a diff with the difference between two index objects.

git_diff_index_to_workdir
int git_diff_index_to_workdir(.git_diff** diff, libgit2_d.types.git_repository* repo, libgit2_d.types.git_index* index, const(.git_diff_options)* opts)

Create a diff between the repository index and the workdir directory.

git_diff_is_sorted_icase
int git_diff_is_sorted_icase(const(.git_diff)* diff)

Check if deltas are sorted case sensitively or insensitively.

git_diff_merge
int git_diff_merge(.git_diff* onto, const(.git_diff)* from)

Merge one diff into another.

git_diff_num_deltas
size_t git_diff_num_deltas(const(.git_diff)* diff)

Query how many diff records are there in a diff.

git_diff_num_deltas_of_type
size_t git_diff_num_deltas_of_type(const(.git_diff)* diff, .git_delta_t type)

Query how many diff deltas are there in a diff filtered by type.

git_diff_options_init
int git_diff_options_init(.git_diff_options* opts, uint version_)

Initialize git_diff_options structure

git_diff_patchid
int git_diff_patchid(libgit2_d.oid.git_oid* out_, .git_diff* diff, .git_diff_patchid_options* opts)

Calculate the patch ID for the given patch.

git_diff_patchid_options_init
int git_diff_patchid_options_init(.git_diff_patchid_options* opts, uint version_)

Initialize git_diff_patchid_options structure

git_diff_print
int git_diff_print(.git_diff* diff, .git_diff_format_t format, .git_diff_line_cb print_cb, void* payload)

Iterate over a diff generating formatted text output.

git_diff_stats_deletions
size_t git_diff_stats_deletions(const(.git_diff_stats)* stats)

Get the total number of deletions in a diff

git_diff_stats_files_changed
size_t git_diff_stats_files_changed(const(.git_diff_stats)* stats)

Get the total number of files changed in a diff

git_diff_stats_free
void git_diff_stats_free(.git_diff_stats* stats)

Deallocate a git_diff_stats.

git_diff_stats_insertions
size_t git_diff_stats_insertions(const(.git_diff_stats)* stats)

Get the total number of insertions in a diff

git_diff_stats_to_buf
int git_diff_stats_to_buf(libgit2_d.buffer.git_buf* out_, const(.git_diff_stats)* stats, .git_diff_stats_format_t format, size_t width)

Print diff statistics to a git_buf.

git_diff_status_char
char git_diff_status_char(.git_delta_t status)

Look up the single character abbreviation for a delta status code.

git_diff_to_buf
int git_diff_to_buf(libgit2_d.buffer.git_buf* out_, .git_diff* diff, .git_diff_format_t format)

Produce the complete formatted text output from a diff into a buffer.

git_diff_tree_to_index
int git_diff_tree_to_index(.git_diff** diff, libgit2_d.types.git_repository* repo, libgit2_d.types.git_tree* old_tree, libgit2_d.types.git_index* index, const(.git_diff_options)* opts)

Create a diff between a tree and repository index.

git_diff_tree_to_tree
int git_diff_tree_to_tree(.git_diff** diff, libgit2_d.types.git_repository* repo, libgit2_d.types.git_tree* old_tree, libgit2_d.types.git_tree* new_tree, const(.git_diff_options)* opts)

Create a diff with the difference between two tree objects.

git_diff_tree_to_workdir
int git_diff_tree_to_workdir(.git_diff** diff, libgit2_d.types.git_repository* repo, libgit2_d.types.git_tree* old_tree, const(.git_diff_options)* opts)

Create a diff between a tree and the working directory.

git_diff_tree_to_workdir_with_index
int git_diff_tree_to_workdir_with_index(.git_diff** diff, libgit2_d.types.git_repository* repo, libgit2_d.types.git_tree* old_tree, const(.git_diff_options)* opts)

Create a diff between a tree and the working directory using index data to account for staged deletes, tracked files, etc.

Manifest constants

GIT_DIFF_FIND_OPTIONS_VERSION
enum GIT_DIFF_FIND_OPTIONS_VERSION;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION
enum GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
GIT_DIFF_HUNK_HEADER_SIZE
enum GIT_DIFF_HUNK_HEADER_SIZE;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
GIT_DIFF_OPTIONS_VERSION
enum GIT_DIFF_OPTIONS_VERSION;

The current version of the diff options structure

GIT_DIFF_PATCHID_OPTIONS_VERSION
enum GIT_DIFF_PATCHID_OPTIONS_VERSION;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Structs

git_diff
struct git_diff

The diff object that contains all individual file deltas.

git_diff_binary
struct git_diff_binary

Structure describing the binary contents of a diff.

git_diff_binary_file
struct git_diff_binary_file

The contents of one of the files in a binary diff.

git_diff_delta
struct git_diff_delta

Description of changes to one entry.

git_diff_file
struct git_diff_file

Description of one side of a delta.

git_diff_find_options
struct git_diff_find_options

Control behavior of rename and copy detection

git_diff_format_email_options
struct git_diff_format_email_options

Options for controlling the formatting of the generated e-mail.

git_diff_hunk
struct git_diff_hunk

Structure describing a hunk of a diff.

git_diff_line
struct git_diff_line

Structure describing a line (or data span) of a diff.

git_diff_options
struct git_diff_options

Structure describing options about how the diff should be executed.

git_diff_patchid_options
struct git_diff_patchid_options

Patch ID options structure

git_diff_similarity_metric
struct git_diff_similarity_metric

Pluggable similarity metric

git_diff_stats
struct git_diff_stats

This is an opaque structure which is allocated by git_diff_get_stats. You are responsible for releasing the object memory when done, using the git_diff_stats_free() function.

Meta