Updated interop and new external API design - #4
Conversation
This is being done to clean up commit history on master.
Did not port all the compare, copy methods as I don't see a new for them right now.
New Lookup API includes: TryLookup TryLookup<T> Lookup Lookup<T> Looks like VS2010 can deal with optional params for .net 3.5 projects, so NET35 ifdefs not necessary yet.
libgit2/libgit2@6dcb09b Also fixed list references issues and reeanbled unit test
Still unsure about the currently strategy of always peeling back refs. This needs some more thought and discussion
This is really just a wrapper around refs, but you can refer to branches
in a much nicer manner ('master' or 'origin/master' for example)
Minor test refactoring to support this including new support for creating a TemporaryRepository
External users of the API should not be able to change the value of GitOid. It is now wrapped in ObjectId which is the new defacto class for defining unique objects in libgit2sharp.
This requires that all GitObjects eager load their properties. Handles to the C git objects are used and immediately closed now.
|
This is bongos, Tim. <3 |
|
Wow. Looks quite nice! I'm going to review this shortly. Thanks a lot :) |
|
Em, you should have taken a look at the devel branch of libgit2sharp, it was far more advanced. |
|
Well, instead of using all the defined structs you just used IntPtr. Now you removed the generator code. I don't know bro, if you really wan't to maintain every single API change by hand, this might not bother you, but I would strongly suggest just adjust it. It is quite a hack, but it makes your life easier. I see you just used the earlier NativeMethods.cs and adjusted it. Well THAT one was generated by the generator. It really made the transition between big API changes fast and easy. After the "big" API changes I needed like 2 hours to adjust the C# code to work again. And you basically got rid of the Core, the core was meant to provide an C# interface to the "naked" C api, and the main lib would use the core in order to create POCOs, so it would be save/safer. It was basically an OOP mirror of the base C API. All in all, I like the idea of moving to more marshaled code, but I'm not so fond of the rest. Especially that this comes out of nowhere, even though I provided some contacts in the readme, shows that you just did what you thought was right without discussing with anyone else. I appreciate the work, but a little bit of collaboration wouldn't have hurt. |
|
@tclem : Applied! That was an awesome proposal. Keep them coming :) |
This is a significant update to libgit2sharp that includes these features: