pub enum AttributeSource {
Index,
Tree(ObjectId),
PerPath(HashMap<Vec<u8>, ObjectId>),
}Expand description
What:
Where the attributes of the candidates are read from.
Index is the private index the candidates were prepared on;
Tree is one commit or tree for every candidate;
PerPath names the commit or tree each path was first listed from.
Why:
Staged candidates are judged by what is staged.
A landed commit is judged by its own tree,
and a push lists several commits and trees,
each of which is judged by itself.
In TS you’d write (pseudocode):
type AttributeSource = { kind: 'index' } | { kind: 'tree'; tree: ObjectId } | { kind: 'per-path'; trees: Map<string, ObjectId> };Variants§
Index
The .gitattributes files of the private index.
Tree(ObjectId)
The .gitattributes files of one commit or tree.
PerPath(HashMap<Vec<u8>, ObjectId>)
The commit or tree each pathname was first listed from.
Trait Implementations§
Source§impl Clone for AttributeSource
impl Clone for AttributeSource
Source§impl Debug for AttributeSource
impl Debug for AttributeSource
impl Eq for AttributeSource
Source§impl PartialEq for AttributeSource
impl PartialEq for AttributeSource
impl StructuralPartialEq for AttributeSource
Auto Trait Implementations§
impl Freeze for AttributeSource
impl RefUnwindSafe for AttributeSource
impl Send for AttributeSource
impl Sync for AttributeSource
impl Unpin for AttributeSource
impl UnsafeUnpin for AttributeSource
impl UnwindSafe for AttributeSource
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> ⓘ
Converts
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> ⓘ
Converts
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