pub enum ObjectExpansion {
AsIs,
TreeContents,
TreeAdditionsComparedToAncestor,
}
generate
only.Expand description
The way input objects are handled
Variants§
AsIs
Don’t do anything with the input objects except for transforming them into pack entries
TreeContents
If the input object is a Commit then turn it into a pack entry. Additionally obtain its tree, turn it into a pack entry
along with all of its contents, that is nested trees, and any other objects reachable from it.
Otherwise, the same as AsIs
.
This mode is useful if all reachable objects should be added, as in cloning a repository.
TreeAdditionsComparedToAncestor
If the input is a commit, obtain its ancestors and turn them into pack entries. Obtain the ancestor trees along with the commits
tree and turn them into pack entries. Finally obtain the added/changed objects when comparing the ancestor trees with the
current tree and turn them into entries as well.
Otherwise, the same as AsIs
.
This mode is useful to build a pack containing only new objects compared to a previous state.
Trait Implementations§
source§impl Clone for ObjectExpansion
impl Clone for ObjectExpansion
source§fn clone(&self) -> ObjectExpansion
fn clone(&self) -> ObjectExpansion
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ObjectExpansion
impl Debug for ObjectExpansion
source§impl Default for ObjectExpansion
impl Default for ObjectExpansion
source§fn default() -> ObjectExpansion
fn default() -> ObjectExpansion
source§impl<'de> Deserialize<'de> for ObjectExpansion
impl<'de> Deserialize<'de> for ObjectExpansion
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Hash for ObjectExpansion
impl Hash for ObjectExpansion
source§impl Ord for ObjectExpansion
impl Ord for ObjectExpansion
source§fn cmp(&self, other: &ObjectExpansion) -> Ordering
fn cmp(&self, other: &ObjectExpansion) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for ObjectExpansion
impl PartialEq for ObjectExpansion
source§fn eq(&self, other: &ObjectExpansion) -> bool
fn eq(&self, other: &ObjectExpansion) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ObjectExpansion
impl PartialOrd for ObjectExpansion
source§fn partial_cmp(&self, other: &ObjectExpansion) -> Option<Ordering>
fn partial_cmp(&self, other: &ObjectExpansion) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more