Skip to content

Shallow Clone #2782

Closed
Closed
@antis81

Description

@antis81

As discussed in issue #1142, shallow clones are not supported yet by the libgit2 clone API.

One can work around this by initializing a repository, setting the core.depth variable in the config, setup a remote etc. But ... it does not work with git_clone().

IMHO the git_clone_options struct should be extended by an unsigned int depth variable, which in turn is given to git_clone() to setup the --depth config variable.

Also referencing issue #1430 - just for the record.

Thanks for all the support this far and merry christmas to y'all.

EDIT: The remote alias "origin" is also set in create_and_configure_origin(). This should be an option as well.

How about adding a git_remote *remote member in git_clone_options, that would allow to manually setup a customized remote?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions