libgit2

diff

Version:

Calculating diffs is generally done in two phases: building a diff list then traversing the diff list. This makes is easier to share logic across the various types of diffs (tree vs tree, workdir vs index, etc.), and also allows you to insert optional diff list post-processing phases, such as rename detected, in between the steps. When you are done with a diff list object, it must be freed.

Objects

The diff list object that contains all individual file deltas

Structs

Structure describing options about how the diff should be executed

Description of one side of a diff

Description of changes to one file

Structure describing a hunk of a diff

Enums

Line origin constants

What type of change is described by a git_diff_delta?

Callbacks

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

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

Deallocate a diff list

Compute a difference between two tree objects

Compute a difference between a tree and the index

Compute a difference between the working directory and the index

Compute a difference between the working directory and a tree

Merge one diff list into another

Iterate over a diff list issuing callbacks

Iterate over a diff generating text output like "git diff --name-status"

Iterate over a diff generating text output like "git diff"

Directly run a text diff on two blobs