Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Possible In-memory repository regression? #1479
Comments
|
Thanks for tackling some more in-memory work. Exciting! I think that this is fallout from the fact that we never really decided how to support building a wholly in-memory repository and add backends to it. I don't remember all the details offhand, so I'll have to debug into this - but this is something that libgit2 itself supports (and tests) so I think the problem is that we're trying to use something before we've fully configured it. |
|
So i looked into this some today. Appears for a in-memory repository that _odb is null (https://github.com/libgit2/libgit2/blob/master/src/repository.c#L1073) and thus when the lazy ObjectDatabase is constructed in the Repository constructor (for the ObjectDatabase property) it explodes in the above test.
|
|
Scratch those code changes/thoughts above. I think I have it figured out. ObjectDatabase needs to call git_odb_new then git_repository_set_odb when its |
So I'm trying to get my branch updated with master https://github.com/Zoxive/libgit2sharp/tree/zoxive/refdb/ which revives the pluggable RefDb backend (#1226)
I've gotten through all the compile issues rebasing it up to the latest with dotnet core, and the codegen stuff. (Took a while to figure out that I had to change all the NativeMethod funcs to use the new custom marshaler)
Anyways all compiles and stuff now.. but testing my changes im running into an error that appears to be coming straight from libgit2.
It happens when i have an in memory repository and an OdbBackend.
Heres a sample unit test that shows the problem.
Zoxive@7957581
I did see that libgit2 had a regression (libgit2/libgit2#4263) @ethomson fixed.
I'm guessing its related?