libgit2

git_diff_delta

Version:

Description of changes to one file.

When iterating over a diff list object, this will generally be passed to most callback functions and you can use the contents to understand exactly what has changed.

Under some circumstances, not all fields will be filled in, but the code generally tries to fill in as much as possible. One example is that the "binary" field will not actually look at file contents if you do not pass in hunk and/or line callbacks to the diff foreach iteration function. It will just use the git attributes for those files.

Signature

typedef struct git_diff_delta { git_diff_file old_file git_diff_file new_file git_delta_t status unsigned int similarity int binary };

Members

old_file
new_file
status
unsigned int
similarity

for RENAMED and COPIED, value 0-100

int
binary

Parameter To

Versions