mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-23 11:19:09 +00:00
Merge pull request #3117 from libgit2/cmn/index-more-accurate
index: make the entries have more accurate sizes
This commit is contained in:
commit
d01737b419
@ -24,9 +24,9 @@ GIT_BEGIN_DECL
|
|||||||
|
|
||||||
/** Time structure used in a git index entry */
|
/** Time structure used in a git index entry */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
git_time_t seconds;
|
int32_t seconds;
|
||||||
/* nsec should not be stored as time_t compatible */
|
/* nsec should not be stored as time_t compatible */
|
||||||
unsigned int nanoseconds;
|
uint32_t nanoseconds;
|
||||||
} git_index_time;
|
} git_index_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -44,22 +44,27 @@ typedef struct {
|
|||||||
* accessed via the later `GIT_IDXENTRY_...` bitmasks below. Some of
|
* accessed via the later `GIT_IDXENTRY_...` bitmasks below. Some of
|
||||||
* these flags are read from and written to disk, but some are set aside
|
* these flags are read from and written to disk, but some are set aside
|
||||||
* for in-memory only reference.
|
* 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.
|
||||||
*/
|
*/
|
||||||
typedef struct git_index_entry {
|
typedef struct git_index_entry {
|
||||||
git_index_time ctime;
|
git_index_time ctime;
|
||||||
git_index_time mtime;
|
git_index_time mtime;
|
||||||
|
|
||||||
unsigned int dev;
|
uint32_t dev;
|
||||||
unsigned int ino;
|
uint32_t ino;
|
||||||
unsigned int mode;
|
uint32_t mode;
|
||||||
unsigned int uid;
|
uint32_t uid;
|
||||||
unsigned int gid;
|
uint32_t gid;
|
||||||
git_off_t file_size;
|
uint32_t file_size;
|
||||||
|
|
||||||
git_oid id;
|
git_oid id;
|
||||||
|
|
||||||
unsigned short flags;
|
uint16_t flags;
|
||||||
unsigned short flags_extended;
|
uint16_t flags_extended;
|
||||||
|
|
||||||
const char *path;
|
const char *path;
|
||||||
} git_index_entry;
|
} git_index_entry;
|
||||||
|
Loading…
Reference in New Issue
Block a user