git_diff_file

Description of one side of a delta.

Although this is called a "file", it could represent a file, a symbolic link, a submodule commit id, or even a tree (although that only if you are tracking type changes or ignored/untracked directories).

The id is the git_oid of the item. If the entry represents an absent side of a diff (e.g. the old_file of a git_delta_t.GIT_DELTA_ADDED delta), then the oid will be zeroes.

path is the NUL-terminated path to the entry relative to the working directory of the repository.

size is the size of the entry in bytes.

flags is a combination of the git_diff_flag_t types

mode is, roughly, the stat() st_mode value for the item. This will be restricted to one of the libgit2_d.types.git_filemode_t values.

The id_abbrev represents the known length of the id field, when converted to a hex string. It is generally GIT_OID_HEXSZ, unless this delta was created from reading a patch file, in which case it may be abbreviated to something reasonable, like 7 characters.

Members

Variables

flags
uint flags;
Undocumented in source.
id
libgit2_d.oid.git_oid id;
Undocumented in source.
id_abbrev
ushort id_abbrev;
Undocumented in source.
mode
ushort mode;
Undocumented in source.
path
const(char)* path;
Undocumented in source.
size
libgit2_d.types.git_object_size_t size;
Undocumented in source.

Meta