libgit2 / libgit2sharp

Git + .NET = ❤
http://libgit2.github.com
MIT License
3.17k stars 886 forks source link

Branch is checked out, although CloneOptions.Checkout=false is set #1978

Open PulsarFX opened 2 years ago

PulsarFX commented 2 years ago

Reproduction steps

Clone a repo like so:

Repository.Clone(remoteDir, localDir, new CloneOptions()
{
    Checkout = false,
    FetchOptions = new FetchOptions() { TagFetchMode = TagFetchMode.All }
});

Expected behavior

No branch is checked out.

Actual behavior

A branch gets checked out. Even if develop or master are missing, it takes the first branch it can find.

Version of LibGit2Sharp (release number or SHA1)

0.27.0-preview-0175

Operating system(s) tested; .NET runtime tested

.net 5.0.17