Expand description
Clone operation options
This module provides a Send-safe way to configure git clone operations. Instead of holding non-Send callbacks directly, we use a configuration approach.
§Example
ⓘ
use git2db::clone_options::CloneOptions;
use git2db::callback_config::{CallbackConfigBuilder, ProgressConfig};
use git2db::auth::AuthStrategy;
let options = CloneOptions::builder()
.callback_config(
CallbackConfigBuilder::new()
.auth(AuthStrategy::SshAgent { username: Some("git".to_owned()) })
.progress(ProgressConfig::Stdout)
.build()
)
.shallow(true)
.depth(1)
.branch("main")
.build();Structs§
- Clone
Options - Send-safe options for cloning a repository
- Clone
Options Builder - Builder for CloneOptions with fluent interface
Enums§
- Clone
Trust - Trust posture for a clone/fetch operation.
- Filter
Mode - Controls whether libgit2 content filters (XET/LFS smudge, and libgit2’s
own built-in
ident/crlffilters) are applied during checkout. - Submodule
Mode - Controls whether
.gitmodules-declared submodules are initialized and updated after a clone.