Struct jj_lib::backend::CopySource
source · pub struct CopySource {
pub path: RepoPathBuf,
pub file: FileId,
pub commit: Option<CommitId>,
}
Expand description
An individual copy source.
Fields§
§path: RepoPathBuf
The source path a target was copied from.
It is not required that the source path is different than the target path. A custom backend may choose to represent ‘rollbacks’ as copies from a file unto itself, from a specific prior commit.
file: FileId
§commit: Option<CommitId>
The source commit the target was copied from. If not specified, then the parent of the target commit is the source commit. Backends may use this field to implement ‘integration’ logic, where a source may be periodically merged into a target, similar to a branch, but the branching occurs at the file level rather than the repository level. It also follows naturally that any copy source targeted to a specific commit should avoid copy propagation on rebasing, which is desirable for ‘fork’ style copies.
If specified, it is required that the commit id is an ancestor of the commit with which this copy source is associated.
Trait Implementations§
source§impl Clone for CopySource
impl Clone for CopySource
source§fn clone(&self) -> CopySource
fn clone(&self) -> CopySource
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CopySource
impl Debug for CopySource
source§impl Hash for CopySource
impl Hash for CopySource
source§impl PartialEq for CopySource
impl PartialEq for CopySource
impl Eq for CopySource
impl StructuralPartialEq for CopySource
Auto Trait Implementations§
impl Freeze for CopySource
impl RefUnwindSafe for CopySource
impl Send for CopySource
impl Sync for CopySource
impl Unpin for CopySource
impl UnwindSafe for CopySource
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more