pub struct IndexEntry { /* private fields */ }Expand description
An entry in the Git index.
Each entry represents a file that is staged for the next commit.
Implementations§
Source§impl IndexEntry
impl IndexEntry
Sourcepub fn new(
ctime: u64,
mtime: u64,
dev: u32,
ino: u32,
mode: FileMode,
uid: u32,
gid: u32,
size: u32,
oid: Oid,
path: PathBuf,
stage: u8,
) -> Self
pub fn new( ctime: u64, mtime: u64, dev: u32, ino: u32, mode: FileMode, uid: u32, gid: u32, size: u32, oid: Oid, path: PathBuf, stage: u8, ) -> Self
Creates a new IndexEntry.
Sourcepub fn stage(&self) -> u8
pub fn stage(&self) -> u8
Returns the stage number.
- 0: Normal entry
- 1: Base version in a merge conflict
- 2: “Ours” version in a merge conflict
- 3: “Theirs” version in a merge conflict
Sourcepub fn is_conflicted(&self) -> bool
pub fn is_conflicted(&self) -> bool
Returns true if this entry is in a merge conflict.
Trait Implementations§
Source§impl Clone for IndexEntry
impl Clone for IndexEntry
Source§fn clone(&self) -> IndexEntry
fn clone(&self) -> IndexEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IndexEntry
impl Debug for IndexEntry
Source§impl PartialEq for IndexEntry
impl PartialEq for IndexEntry
impl Eq 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 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
Mutably borrows from an owned value. Read more