pub struct PartialCloneConfig;Expand description
Writes Git partial-clone configuration for remote after a filtered fetch/clone.
Implementations§
Source§impl PartialCloneConfig
impl PartialCloneConfig
Sourcepub fn write(
git_dir: &Path,
remote: &str,
spec: &ObjectFilterSpec,
) -> Result<()>
pub fn write( git_dir: &Path, remote: &str, spec: &ObjectFilterSpec, ) -> Result<()>
Set promisor-remote keys matching git clone --filter=….
Writes remote.<remote>.promisor=true, remote.<remote>.partialclonefilter,
extensions.partialclone=<remote>, and core.repositoryformatversion=1.
§Errors
Returns crate::error::Error on config I/O failure.
Sourcepub fn write_auto(git_dir: &Path, remote: &str) -> Result<()>
pub fn write_auto(git_dir: &Path, remote: &str) -> Result<()>
Set the same keys as Self::write with the filter left to be chosen on each fetch
(remote.<remote>.partialclonefilter=auto, Git’s clone --filter=auto).
Each later fetch from remote then picks its filter from the promisor remotes the
server advertises and the client accepts (see
PromisorDecision::combined_filter).
Git older than 2.54 does not understand the auto value.
§Errors
Returns crate::error::Error on config I/O failure.
Auto Trait Implementations§
impl Freeze for PartialCloneConfig
impl RefUnwindSafe for PartialCloneConfig
impl Send for PartialCloneConfig
impl Sync for PartialCloneConfig
impl Unpin for PartialCloneConfig
impl UnsafeUnpin for PartialCloneConfig
impl UnwindSafe for PartialCloneConfig
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