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

clone with --force arg #826

Open
alexzanderr opened this issue Mar 24, 2022 · 5 comments
Open

clone with --force arg #826

alexzanderr opened this issue Mar 24, 2022 · 5 comments

Comments

@alexzanderr
Copy link

im trying to clone a repo by force into an existing one

            let repo = Repository::clone(
                package_template_repo_url,
                clone_destination.clone(),
            );

apparently there is no args method for builder pattern.

how can i specify arguments to clone method ?

such as:

  • force ? does this exist ?
  • --branch
  • --depth
    and many more
@ehuss
Copy link
Contributor

ehuss commented Mar 24, 2022

You can use RepoBuilder to control the clone options (FetchOptions, CheckoutBuilder, etc.). libgit2 does not support shallow clones, though.

@alexzanderr
Copy link
Author

yeah. but that example is very minimal ...

@alexzanderr
Copy link
Author

thats all the documentation for that ? ...

@ehuss
Copy link
Contributor

ehuss commented Mar 25, 2022

That is the documentation available. Is there something that seems to be missing? The FetchOptions and CheckoutBuilder contains documentation for each option.

@alexzanderr
Copy link
Author

okey, i'll read the docs and come back later.

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

2 participants