Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plan to implement --depth option? #875

Closed
kyoheiu opened this issue Sep 1, 2022 · 3 comments
Closed

Plan to implement --depth option? #875

kyoheiu opened this issue Sep 1, 2022 · 3 comments

Comments

@kyoheiu
Copy link

kyoheiu commented Sep 1, 2022

It would be great if this crate implements --depth option in FetchOptions, For example,

  let mut fo = git2::FetchOptions::new();
  fo.depth(1);

  // Prepare builder.
  let mut builder = git2::build::RepoBuilder::new();
  builder.fetch_options(fo);

  // Clone the project.
  builder.clone(
    "git@github.com:rust-lang/git2-rs.git",
    Path::new("/tmp/git2-rs"),
  );
@extrawurst
Copy link
Contributor

Probably better to add as a request upstream in libgit2

@ehuss
Copy link
Contributor

ehuss commented Sep 1, 2022

This is a libgit2 limitation. Closing as a duplicate of libgit2/libgit2#3058.

@ehuss ehuss closed this as not planned Won't fix, can't repro, duplicate, stale Sep 1, 2022
@RCasatta
Copy link

It looks it's not a limitation anymore:
libgit2/libgit2#3058 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants