pub struct Entry {
pub stat: Stat,
pub id: ObjectId,
pub flags: Flags,
pub mode: Mode,
/* private fields */
}
index
only.Expand description
An entry in the index, identifying a non-tree item on disk.
Fields§
§stat: Stat
The filesystem stat information for the file on disk.
id: ObjectId
The object id for this entry’s ODB representation (assuming it’s up-to-date with it).
flags: Flags
Additional flags for use in algorithms and for efficiently storing stage information.
mode: Mode
The kind of item this entry represents - it’s not all blobs in the index anymore.
Implementations§
Source§impl Entry
impl Entry
Sourcepub fn path<'a>(&self, state: &'a State) -> &'a BStr
Available on crate feature excludes
only.
pub fn path<'a>(&self, state: &'a State) -> &'a BStr
excludes
only.Return an entry’s path, relative to the repository, which is extracted from its owning state
.
Sourcepub fn path_in<'backing>(&self, backing: &'backing [u8]) -> &'backing BStr
Available on crate feature excludes
only.
pub fn path_in<'backing>(&self, backing: &'backing [u8]) -> &'backing BStr
excludes
only.Return an entry’s path using the given backing
.
Sourcepub fn stage(&self) -> Stage
Available on crate feature excludes
only.
pub fn stage(&self) -> Stage
excludes
only.Return an entry’s stage. See entry::Stage for possible values.
Source§impl Entry
impl Entry
Sourcepub fn cmp(&self, other: &Entry, state: &State) -> Ordering
Available on crate feature excludes
only.
pub fn cmp(&self, other: &Entry, state: &State) -> Ordering
excludes
only.Compare one entry to another by their path, by comparing only their common path portion byte by byte, then resorting to entry length and stage.
Sourcepub fn cmp_filepaths(a: &BStr, b: &BStr) -> Ordering
Available on crate feature excludes
only.
pub fn cmp_filepaths(a: &BStr, b: &BStr) -> Ordering
excludes
only.Compare one entry to another by their path, by comparing only their common path portion byte by byte, then resorting to entry length.