libgit2

git_index_entry

Version:

In-memory representation of a file entry in the index.

This is a public structure that represents a file entry in the index. The meaning of the fields corresponds to core Git's documentation (in "Documentation/technical/index-format.txt").

The flags field consists of a number of bit fields which can be accessed via the first set of GIT_IDXENTRY_... bitmasks below. These flags are all read from and persisted to disk.

The flags_extended field also has a number of bit fields which can be accessed via the later GIT_IDXENTRY_... bitmasks below. Some of these flags are read from and written to disk, but some are set aside for in-memory only reference.

Note that the time and size fields are truncated to 32 bits. This is enough to detect changes, which is enough for the index to function as a cache, but it should not be taken as an authoritative source for that data.

Signature

typedef struct git_index_entry { git_index_time ctime git_index_time mtime uint32_t dev uint32_t ino uint32_t mode uint32_t uid uint32_t gid uint32_t file_size git_oid id uint16_t flags uint16_t flags_extended const char *path };

Members

uint32_t
dev
uint32_t
ino
uint32_t
mode
uint32_t
uid
uint32_t
gid
uint32_t
file_size
id
uint16_t
flags
uint16_t
flags_extended
const char *
path

Returned By

Parameter To

Versions