libgit2_d.patch

Undocumented in source.

Members

Functions

git_patch_free
void git_patch_free(.git_patch* patch)

Free a git_patch object.

git_patch_from_blob_and_buffer
int git_patch_from_blob_and_buffer(.git_patch** out_, const(libgit2_d.types.git_blob)* old_blob, const(char)* old_as_path, const(void)* buffer, size_t buffer_len, const(char)* buffer_as_path, const(libgit2_d.diff.git_diff_options)* opts)

Directly generate a patch from the difference between a blob and a buffer.

git_patch_from_blobs
int git_patch_from_blobs(.git_patch** out_, 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(libgit2_d.diff.git_diff_options)* opts)

Directly generate a patch from the difference between two blobs.

git_patch_from_buffers
int git_patch_from_buffers(.git_patch** out_, 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(libgit2_d.diff.git_diff_options)* opts)

Directly generate a patch from the difference between two buffers.

git_patch_from_diff
int git_patch_from_diff(.git_patch** out_, libgit2_d.diff.git_diff* diff, size_t idx)

Return a patch for an entry in the diff list.

git_patch_get_delta
const(libgit2_d.diff.git_diff_delta)* git_patch_get_delta(const(.git_patch)* patch)

Get the delta associated with a patch. This delta points to internal data and you do not have to release it when you are done with it.

git_patch_get_hunk
int git_patch_get_hunk(const(libgit2_d.diff.git_diff_hunk)** out_, size_t* lines_in_hunk, .git_patch* patch, size_t hunk_idx)

Get the information about a hunk in a patch

git_patch_get_line_in_hunk
int git_patch_get_line_in_hunk(const(libgit2_d.diff.git_diff_line)** out_, .git_patch* patch, size_t hunk_idx, size_t line_of_hunk)

Get data about a line in a hunk of a patch.

git_patch_line_stats
int git_patch_line_stats(size_t* total_context, size_t* total_additions, size_t* total_deletions, const(.git_patch)* patch)

Get line counts of each type in a patch.

git_patch_num_hunks
size_t git_patch_num_hunks(const(.git_patch)* patch)

Get the number of hunks in a patch

git_patch_num_lines_in_hunk
int git_patch_num_lines_in_hunk(const(.git_patch)* patch, size_t hunk_idx)

Get the number of lines in a hunk.

git_patch_print
int git_patch_print(.git_patch* patch, libgit2_d.diff.git_diff_line_cb print_cb, void* payload)

Serialize the patch to text via callback.

git_patch_size
size_t git_patch_size(.git_patch* patch, int include_context, int include_hunk_headers, int include_file_headers)

Look up size of patch diff data in bytes

git_patch_to_buf
int git_patch_to_buf(libgit2_d.buffer.git_buf* out_, .git_patch* patch)

Get the content of a patch as a single diff text.

Structs

git_patch
struct git_patch

The diff patch is used to store all the text diffs for a delta.

Meta