pub enum RewriteSource<'index, ContentChange, SubmoduleStatus> {
RewriteFromIndex {
index_entries: &'index [Entry],
source_entry: &'index Entry,
source_entry_index: usize,
source_rela_path: &'index BStr,
source_status: EntryStatus<ContentChange, SubmoduleStatus>,
},
CopyFromDirectoryEntry {
source_dirwalk_entry: Entry,
source_dirwalk_entry_collapsed_directory_status: Option<Status>,
source_dirwalk_entry_id: ObjectId,
},
}
worktree-rewrites
only.Expand description
Either an index entry for renames or another directory entry in case of copies.
Variants§
RewriteFromIndex
The source originates in the index and is detected as missing in the working tree. This can also happen for copies.
Fields
source_entry: &'index Entry
The entry that is the source of the rewrite, which means it was removed on disk, equivalent to Change::Removed.
Note that the entry-id is the content-id of the source of the rewrite.
source_entry_index: usize
The index of the source_entry
for lookup in index_entries
- useful to look at neighbors.
source_status: EntryStatus<ContentChange, SubmoduleStatus>
The computed status of the source_entry
.
CopyFromDirectoryEntry
This source originates in the directory tree and is always the source of copies.
Fields
source_dirwalk_entry: Entry
The source of the copy operation, which is also an entry of the directory walk.
Note that its rela_path
is the source of the rewrite.
source_dirwalk_entry_collapsed_directory_status: Option<Status>
collapsed_directory_status
is Some(dir_status)
if this source_dirwalk_entry
was part of a directory with the given
dir_status
that wasn’t the same as the one of source_dirwalk_entry
and if gix_dir::walk::Options::emit_collapsed was
CollapsedEntriesEmissionMode::OnStatusMismatch.
It will also be Some(dir_status)
if that option was CollapsedEntriesEmissionMode::All.
Implementations§
Trait Implementations§
source§impl<'index, ContentChange: Clone, SubmoduleStatus: Clone> Clone for RewriteSource<'index, ContentChange, SubmoduleStatus>
impl<'index, ContentChange: Clone, SubmoduleStatus: Clone> Clone for RewriteSource<'index, ContentChange, SubmoduleStatus>
source§fn clone(&self) -> RewriteSource<'index, ContentChange, SubmoduleStatus>
fn clone(&self) -> RewriteSource<'index, ContentChange, SubmoduleStatus>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'index, ContentChange: Debug, SubmoduleStatus: Debug> Debug for RewriteSource<'index, ContentChange, SubmoduleStatus>
impl<'index, ContentChange: Debug, SubmoduleStatus: Debug> Debug for RewriteSource<'index, ContentChange, SubmoduleStatus>
source§impl<'index, ContentChange: PartialEq, SubmoduleStatus: PartialEq> PartialEq for RewriteSource<'index, ContentChange, SubmoduleStatus>
impl<'index, ContentChange: PartialEq, SubmoduleStatus: PartialEq> PartialEq for RewriteSource<'index, ContentChange, SubmoduleStatus>
source§fn eq(
&self,
other: &RewriteSource<'index, ContentChange, SubmoduleStatus>,
) -> bool
fn eq( &self, other: &RewriteSource<'index, ContentChange, SubmoduleStatus>, ) -> bool
self
and other
values to be equal, and is used by ==
.impl<'index, ContentChange, SubmoduleStatus> StructuralPartialEq for RewriteSource<'index, ContentChange, SubmoduleStatus>
Auto Trait Implementations§
impl<'index, ContentChange, SubmoduleStatus> Freeze for RewriteSource<'index, ContentChange, SubmoduleStatus>
impl<'index, ContentChange, SubmoduleStatus> RefUnwindSafe for RewriteSource<'index, ContentChange, SubmoduleStatus>where
SubmoduleStatus: RefUnwindSafe,
ContentChange: RefUnwindSafe,
impl<'index, ContentChange, SubmoduleStatus> Send for RewriteSource<'index, ContentChange, SubmoduleStatus>
impl<'index, ContentChange, SubmoduleStatus> Sync for RewriteSource<'index, ContentChange, SubmoduleStatus>
impl<'index, ContentChange, SubmoduleStatus> Unpin for RewriteSource<'index, ContentChange, SubmoduleStatus>
impl<'index, ContentChange, SubmoduleStatus> UnwindSafe for RewriteSource<'index, ContentChange, SubmoduleStatus>where
SubmoduleStatus: UnwindSafe,
ContentChange: UnwindSafe,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)