GitLib.NET icon indicating copy to clipboard operation
GitLib.NET copied to clipboard

Document why this over Libgit2Sharp

Open shmuelie opened this issue 6 years ago • 2 comments

Why would I use this over Libgit2sharp?

shmuelie avatar Jun 18 '19 17:06 shmuelie

Hi Samuel, I'm supposed to write a blog post about it, but don't know when I will have the spare time to do it 😅 , so here are a few reasons:

  • GitLib.NET is for now more a proof of concept than a completed PInvoke wrapper. It is mostly for me a playground for CppAst.CodeGen
  • Why using libgit2 as a playground? I have already used LibGit2Sharp in the past and I have been quite frustrated by the facts that
    1. they don't expose the entire libgit2 API
    2. the libgit2 API is abstracted. While there is a relatively good documentation of the libgit2 low level API, it's sometimes difficult to map it to the higher level
    3. the abstraction implies using managed objects (and managed allocations) all over the places while you could interact with libgit2 directly with the bare minimum allocations (e.g string marshaling) but without creating a managed object for every single opaque pointer in libgit2 (e.g commits). This can make interaction with libgit2 a lot less efficient

To make GitLib.NET completed, it will still require to go through every single function mapped, check that it is actually correctly exposed (or fix it if it isn't issue #1) and add proper test for it (issue #2)

xoofx avatar Jun 20 '19 05:06 xoofx

All good reasons!

they don't expose the entire libgit2 API

I've run into this one myself!

shmuelie avatar Jun 20 '19 13:06 shmuelie