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 stat_cache_unset(&self) -> bool
pub fn stat_cache_unset(&self) -> bool
Whether cached stat fields were never populated (e.g. index built from a tree).
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.
Sourcepub fn overlay_tree_skip_output(&self) -> bool
pub fn overlay_tree_skip_output(&self) -> bool
Whether extended index flags request skipping overlay tree output.
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§impl Debug for IndexEntry
impl Debug for IndexEntry
impl Eq for IndexEntry
Source§impl PartialEq for IndexEntry
impl PartialEq for IndexEntry
impl StructuralPartialEq for IndexEntry
Auto Trait Implementations§
impl Freeze for IndexEntry
impl RefUnwindSafe for IndexEntry
impl Send for IndexEntry
impl Sync for IndexEntry
impl Unpin for IndexEntry
impl UnsafeUnpin for IndexEntry
impl UnwindSafe for IndexEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.