pub struct IndexEntry {}Expand description
A single entry in the Git index.
Fields§
§ctime_sec: u32Time the file metadata last changed (seconds since epoch).
ctime_nsec: u32Nanosecond fraction of ctime_sec.
mtime_sec: u32Time the file data last changed (seconds since epoch).
mtime_nsec: u32Nanosecond fraction of mtime_sec.
dev: u32Device number.
ino: u32Inode number.
mode: u32Unix file mode (MODE_REGULAR, MODE_EXECUTABLE, MODE_SYMLINK, …).
uid: u32Owner UID.
gid: u32Owner GID.
size: u32File size in bytes (truncated to 32 bits).
oid: ObjectIdSHA-1 of the blob object.
flags: u16Entry flags (stage, assume-valid, extended, …).
flags_extended: Option<u16>Extended flags (v3+ only).
path: Vec<u8>Path relative to the repository root. May contain / separators.
base_index_pos: u32Split index: position in shared base (1-based), or 0 if not from shared index.
Implementations§
Source§impl IndexEntry
impl IndexEntry
Sourcepub fn assume_unchanged(&self) -> bool
pub fn assume_unchanged(&self) -> bool
Whether the assume-unchanged bit is set.
Sourcepub fn skip_worktree(&self) -> bool
pub fn skip_worktree(&self) -> bool
Whether the skip-worktree bit is set (extended flags, v3+).
Sourcepub fn set_assume_unchanged(&mut self, value: bool)
pub fn set_assume_unchanged(&mut self, value: bool)
Set the assume-unchanged bit.
Sourcepub fn set_skip_worktree(&mut self, value: bool)
pub fn set_skip_worktree(&mut self, value: bool)
Set the skip-worktree bit (promotes entry to v3).
Sourcepub fn intent_to_add(&self) -> bool
pub fn intent_to_add(&self) -> bool
Whether the intent-to-add bit is set (extended flags, v3+).
Sourcepub fn set_intent_to_add(&mut self, value: bool)
pub fn set_intent_to_add(&mut self, value: bool)
Set the intent-to-add bit (promotes entry to v3).
Sourcepub fn is_sparse_directory_placeholder(&self) -> bool
pub fn is_sparse_directory_placeholder(&self) -> bool
Sparse-index placeholder: tree mode, stage 0, and SKIP_WORKTREE set.
pub fn overlay_tree_skip_output(&self) -> bool
Sourcepub fn fsmonitor_valid(&self) -> bool
pub fn fsmonitor_valid(&self) -> bool
Whether the fsmonitor-valid bit is set.
Sourcepub fn set_fsmonitor_valid(&mut self, value: bool)
pub fn set_fsmonitor_valid(&mut self, value: bool)
Set or clear the fsmonitor-valid bit.
Trait Implementations§
Source§impl Clone for IndexEntry
impl Clone for IndexEntry
Source§fn clone(&self) -> IndexEntry
fn clone(&self) -> IndexEntry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more