pub enum Shallow {
NoChange,
DepthAtRemote(NonZeroU32),
Deepen(u32),
Since {
cutoff: Time,
},
Exclude {
remote_refs: Vec<PartialName>,
since_cutoff: Option<Time>,
},
}
Expand description
Describe how shallow clones are handled when fetching, with variants defining how the shallow boundary is handled.
The shallow boundary is a set of commits whose parents are not present in the repository.
Variants§
NoChange
Fetch all changes from the remote without affecting the shallow boundary at all.
This also means that repositories that aren’t shallow will remain like that.
DepthAtRemote(NonZeroU32)
Receive update to depth
commits in the history of the refs to fetch (from the viewpoint of the remote),
with the value of 1
meaning to receive only the commit a ref is pointing to.
This may update the shallow boundary to increase or decrease the amount of available history.
Deepen(u32)
Increase the number of commits and thus expand the shallow boundary by depth
commits as seen from our local
shallow boundary, with a value of 0
having no effect.
Since
Set the shallow boundary at the cutoff
time, meaning that there will be no commits beyond that time.
Exclude
Receive all history excluding all commits reachable from remote_refs
. These can be long or short
ref names or tag names.
Fields
remote_refs: Vec<PartialName>
The ref names to exclude, short or long. Note that ambiguous short names will cause the remote to abort without an error message being transferred (because the protocol does not support it)
since_cutoff: Option<Time>
If some, this field has the same meaning as Shallow::Since
which can be used in combination
with excluded references.