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

Support 'depth' in cloneOptions #624

Closed
Trendy opened this issue Jun 26, 2015 · 6 comments
Closed

Support 'depth' in cloneOptions #624

Trendy opened this issue Jun 26, 2015 · 6 comments

Comments

@Trendy
Copy link

Trendy commented Jun 26, 2015

I'm using nodegit to automate the setup process of a large project with many dependencies. I'd like to be able to reduce the time it takes to clone some of the repositories by limiting the clone to the last 200 revisions, but nodegit does not support the depth option as far as I can tell.

Example git command:

git clone --depth 200 path/to/repo.git 
@tbranyen
Copy link
Member

Unfortunately we are limited by the design and API of libgit2, which currently does not support shallow clones. You can find more information here: libgit2/libgit2#3058

@WORMSS
Copy link

WORMSS commented Sep 13, 2016

Shouldn't this still be open but with a RequiresUpstream label or something?

@maxkorp
Copy link
Collaborator

maxkorp commented Sep 13, 2016

Odds are once it's available upstream, it will just automagically land in nodegit, unless there is something special about it that requires explicit attention on our end.

@Hatko
Copy link

Hatko commented Oct 21, 2018

Is it still unavailable?

@maxkorp
Copy link
Collaborator

maxkorp commented Oct 22, 2018

@Hatko I only did a cursory search of the libgit2 api docs here by doing a text search for depth, as well as a quick glance at the git_clone_options struct, but yeah, I don't see any sign of depth support. It would be worth asking in the libgit2 slack.

@jmcgill
Copy link

jmcgill commented May 23, 2023

This is now available in libgit2 libgit2/libgit2#3058

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

6 participants