rust-lang / git2-rs

libgit2 bindings for Rust
https://docs.rs/git2
Apache License 2.0
1.64k stars 380 forks source link

git clone arguments #1045

Open uglyoldbob opened 2 months ago

uglyoldbob commented 2 months ago

I would like to be able to specify arguments for the clone command. Specifically, "--depth 1 --branch (branch_name)"

danechitoaie commented 1 month ago

You can set the depth of the clone using FetchOptions#depth