libgit2 / libgit2/libgit2sharp

Idea: Separate Low Level LibGit2 Wrapper and Higher Level Convenience Classes

未關閉
#1,998 14 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
C#
星號
3.5k
分支
925
PR 合併指標
30 天內沒有已合併 PR

描述

Looking at the pace of this repository it seems due to the lack of contributors it almost appears that there is not much happening on this library and it is not really in a production ready state.

Git/LibGit2 are advancing fast and obviously it is hard to keep up the pace providing a full .net flavor on top of that.

Hence I was thinking of the following: What if there would be two packages around libgit2sharp:

  1. libgit2sharp.Internals, libgitsharp2.Core or reuse the existing libgit2sharp.NativeLibs: which is a very low level wrapper around the C-API of libgit2. This whole wrapper would be auto-generated using the structs and function definitions of the native lib. It just allows you to inconviniently use the C-API in the .net world. This library should be almost instantly up-to-date with the native libgit2 due to its automatic build and code generation nature. It allows everyone who is advanced enough to use low level APIs of libgit2. Also if APIs are not yet exposed on the higher level library (point 2) you might be able to call some low level functions if you know how to handle it. In short, it is likely everything in https://github.com/libgit2/libgit2sharp/tree/master/LibGit2Sharp/Core but publicly exposed for users who are capable of using such low levels as autogenerated code + some manual helpers maybe to make marshalling easier. We could use https://github.com/mono/CppSharp for this. It is well maintained and used.
  2. libgit2sharp which provides the convenience APIs on top of the point 1 library which has proper native memory management. Nice APIs to interact with everything which needs time to design and implement manually. This library will likely be a bit slower to be up-to-date with the native lib because it needs manual development and organization.

We are concerned to use libgit2sharp in new projects due to its nature of not being maintained and uptodate. This implies risk of not getting bugfixes (feature and security wise) or new functionalities which are added to libgit2 in fast pace. I looked at how most .net tools currently interact with git and they seem to mostly rely on calling the git.exe and parse the outputs (I checked Visual Studio, Fork, GitHub Desktop and some other tools to evaluate how they do it) so we are left to either develop again an own framework for us, or rely on libgit2sharp which is struggling.

Let me know what you think of such an idea?

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

先閱讀現有的 LibGit2Sharp/Core wrapper 和 NativeLibs 區域,然後檢視提議的 CppSharp 方案以及 libgit2 的原生 API 定義。要視為完成,必須確定一致同意的套件邊界、產生與維護計畫,以及低階 API 和便利 API 的明確範圍。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
csharp, git
領域
tooling
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
停滯
描述清晰度
需要釐清
新手友好度
20/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。