libgit2

diff

Version:
Indicate the differences between two versions of the repository

Objects

The diff object that contains all individual file deltas

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.

Structs

Description of one side of a delta

Description of changes to one entry

Structure describing options about how the diff should be executed

The contents of one of the files in a binary diff

Structure describing the binary contents of a diff

Structure describing a hunk of a diff

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

Pluggable similarity metric

Control behavior of rename and copy detection

Options for parsing a diff / patch file

Patch ID options structure

Macros

The current version of the diff options structure

Stack initializer for diff options

Maximum size of the hunk header

Current version for the git_diff_find_options structure

The current version of the diff parse options structure

Stack initializer for diff parse options

Enums

Flags for diff options in via the flags value in the git_diff_options.

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

What type of change is described by a git_diff_delta?

When producing a binary diff, the binary data returned will be either the deflated full ("literal") contents of the file, or the deflated binary delta between the two sides (whichever is smaller)

Line origin constants

Flags to control the behavior of diff rename/copy detection

Possible output formats for diff data

Formatting options for diff stats

Callbacks

Diff notification callback function

Diff progress callback

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

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

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

When iterating over a diff, callback that will be made per text diff line

Functions

Initialize git_diff_options structure

Initialize git_diff_find_options structure

Deallocate a diff

Create a diff with the difference between two tree objects

Create a diff between a tree and repository index

Create a diff between the repository index and the workdir directory

Create a diff between a tree and the working directory

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

Create a diff with the difference between two index objects

Merge one diff into another

Transform a diff marking file renames, copies, etc

Query how many diff records are there in a diff

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

Return the diff delta for an entry in the diff list

Check if deltas are sorted case sensitively or insensitively

Loop over all deltas in a diff issuing callbacks

Look up the single character abbreviation for a delta status code

Iterate over a diff generating formatted text output

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

Directly run a diff on two blobs

Directly run a diff between a blob and a buffer

Directly run a diff between two buffers

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

Accumulate diff statistics for all patches

Get the total number of files changed in a diff

Get the total number of insertions in a diff

Get the total number of deletions in a diff

Print diff statistics to a git_buf

Initialize git_diff_patchid_options structure

Calculate the patch ID for the given patch