Voo
Voo

Reputation: 30235

Fetch single commit with LibGit2[Sharp]

How can I do the equivalent of git fetch origin <CommitHash> with LibGit2Sharp?

It seems the only relevant option for git_remote_fetch are the refspecs so I imagine I need some trickery there, but I don't see how from the documentation.

The idea is to fetch only the data required and not everything from the remote since the repo is a shallow clone.

Upvotes: 0

Views: 176

Answers (1)

nulltoken
nulltoken

Reputation: 67659

Although libgit2 implemented shallow cloning in v1.7.0, it hasn't surfaced in Libgit2Sharp yet.

The issue to subscribe to in order to follow up on the feature request is #229.

Upvotes: 1

Related Questions