Skip to content

Conversation

@kitbellew
Copy link

It fails in git_clone with error -3, but I couldn't reproduce it in libgit2 itself.

@kitbellew
Copy link
Author

@nulltoken @ethomson
While I intended for this build to fail, the failure is different on Windows.

My libgit2sharp repository is checked out on a W: volume (mounted from MacOSX home inside Parallels), the temporary path is on C: and the error message is actually missing the volume so it's possible that there is some problem with cross-volume clones:

LibGit2Sharp.LibGit2SharpExceptionFailed to resolve path '\Users\<MYUSERNAME>\AppData\Local\Temp\4a448c87': The system cannot find the path specified.
   at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in Ensure.cs: line 109
   at LibGit2Sharp.Core.Ensure.ZeroResult(Int32 result) in Ensure.cs: line 127
   at LibGit2Sharp.Core.Proxy.git_clone(String url, String workdir, ref GitCloneOptions opts) in Proxy.cs: line 282
   at LibGit2Sharp.Repository.Clone(String sourceUrl, String workdirPath, CloneOptions options) in Repository.cs: line 560
   at LibGit2Sharp.Tests.CloneFixture.AssertLocalClone(String path) in CloneFixture.cs: line 43
   at LibGit2Sharp.Tests.CloneFixture.CanCloneALocalRepositoryFromANewlyCreatedTemporaryPath() in CloneFixture.cs: line 78

@nulltoken
Copy link
Member

Hmmm... There Travis failure is really strange

LibGit2Sharp.Tests.CloneFixture.CanCloneALocalRepositoryFromANewlyCreatedTemporaryPath: Assert.Equal() Failure
Expected: refs/heads/master
Actual:   refs/heads/master

@nulltoken
Copy link
Member

Hmmm. The assertion that fails on Travis is Assert.Equal(originalRepo.Head, clonedRepo.Head);.

I'm not sure to understand how this relates the fix in libgit2/libgit2#2397.
Could it be a different issue?

@carlosmn @kitbellew Any idea?

@kitbellew
Copy link
Author

@nulltoken The problem here is that this test fails differently for me (see stacktrace above) and doesn't reach the point where the heads fail to compare (which is what Travis' mono builds experience).

The fix in libgit2 addresses my use case (local clone between different filesystems, with different drive letters). I'm not sure, however, how to test it with c# since I don't know how to build the native library for use with c#.

@nulltoken
Copy link
Member

There's a powershell script at the root of the repository that you could tweak to build your own version of the native libraries. It requires CMake to be installed though.

@kitbellew
Copy link
Author

@nulltoken This bug was fixed in libgit2/libgit2#2399. I know you just released 0.18.0 but with this bug it's not very usable, so if you could upgrade to 0.18.1 including that fix, it would be great.

@kitbellew
Copy link
Author

Fixed in libgit2.

@nulltoken
Copy link
Member

#751 should fix this

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

Successfully merging this pull request may close these issues.

2 participants