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

pygit2: How to implement git clone --single-branch? #1290

Open
leiless opened this issue May 15, 2024 · 0 comments
Open

pygit2: How to implement git clone --single-branch? #1290

leiless opened this issue May 15, 2024 · 0 comments

Comments

@leiless
Copy link

leiless commented May 15, 2024

$ git clone -h
usage: git clone [<options>] [--] <repo> [<dir>]
...
    -b, --branch <branch>
                          checkout <branch> instead of the remote's HEAD
...
    --single-branch       clone only one branch, HEAD or --branch

Hi, all. git clone has an option (i.e. --single-branch) to specify only clone one branch.
Just wonder if anyone knows how to implement this functionality with pygit2?

With --single-branch, git branch -a will has only one branch, not all remote branches.

--

Might be helpful:
libgit2/libgit2#2924
nodegit/nodegit#1669

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

1 participant