Open starteNCS opened 1 year ago
Hi, we are having the exact same problem in our company. Is this a confirmed bug or an error in using the library?
UPDATE: This is how we solved the problem:
var existingRemoteBranch = Commands.Checkout(repository, existingRemoteBranchReference); var localBranch = repository.CreateBranch(localBranchName, existingRemoteBranch.Tip); repository.Branches.Update(localBranch, b => { b.Remote = "origin"; b.UpstreamBranch = localBranch.CanonicalName; } var branchToWorkWith = Commands.Checkout(repository, localBranch);
I encountered a Bug where Checkout would not checkout the provided branch, but rather nothing (?). This somehow does not occur on my local dev-machine, but only on our pipeline agent.
Reproduction steps
This is my code to commit my changes
And this loads the provided branch.
Expected behavior
I would except, that every logging statement would print "develop"
Actual behavior
Only the first logging prints "develop". The following only print "(no branch)"![image](https://github.com/libgit2/libgit2sharp/assets/30404993/fedd41ee-3532-43a3-99fd-5d7a12ac00b7)
Version of LibGit2Sharp (release number or SHA1)
0.27.2
Operating system(s) tested; .NET runtime tested
Local dev-machine: Windows 10 Pipeline: ubuntu