I'm using git2 to clone information from Subsurface. Subsurface uses a branch equal to the email/username for storing info, but doesn't change the default branch from master.
Historically this has been fine, but now I've been running into the following error & can't work out what's happening:
an unknown git error occurred; code=NotFound (-3)
By using the git2::build::RepoBuilder::branch() & specifying the branch when cloning, it fails and the directory does not even contain the .git/ folder. If I set the head & checkout after cloning it doesn't fail.
Here's the code that is failing (that used to work, not sure what broke here!):
I'm using git2 to clone information from Subsurface. Subsurface uses a branch equal to the email/username for storing info, but doesn't change the default branch from master.
Historically this has been fine, but now I've been running into the following error & can't work out what's happening:
By using the
git2::build::RepoBuilder::branch()
& specifying the branch when cloning, it fails and the directory does not even contain the.git/
folder. If I set the head & checkout after cloning it doesn't fail.Here's the code that is failing (that used to work, not sure what broke here!):
This code works:
Running what I think also the equivalent command via CLI works fine:
This could totally be a non-issue obviously & maybe the second code is more "correct" but thought I'd document it here to see if anyone runs into it.