是否libgit2项目或其他任何人提供样品code演示各种功能libgit2? [英] Does the libgit2 project or anyone else provide sample code to demonstrate the various libgit2 functions?

查看:200
本文介绍了是否libgit2项目或其他任何人提供样品code演示各种功能libgit2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用libgit2通过另一种语言的FFI,但我有困难搞清楚什么各种功能真正做到(我倒是preFER不诉诸阅读源$ C ​​$ C,除非绝对必要)。有谁知道在哪里可以找到一些工作code样品一些在libgit2的功能呢?

I am using libgit2 via an FFI in another language but I am having difficulty figuring out what various functions actually do (and I'd prefer not to resort to reading the source code unless absolutely necessary). Does anyone know where I can find some working code samples for some of the functions in libgit2?

推荐答案

有很多方法可以帮助你得到libgit2启动:

There are many ways to help you get a start with libgit2:


  • A 系列文章的 从本斯特劳布,之一核心贡献者

  • 采取偷看在libgit2 例子 这是写在一个很容易理解的C $ C $ç

  • 通过 阅读这描述每个功能,预期的参数和生成的输出

  • 另一个角度是看 libgit2测试 其中强调每个功能的行为合同,或者,如果你更熟悉其他语言,在一些libgit2绑定的考验code偷看,然后潜入他们行使libgit2方式
    • A series of posts from Ben Straub, one of the core contributors
    • Taking a peek at the libgit2 examples which are written in a very easily understandable C code
    • Reading through the headers which describe each function, expected parameters and produced output
    • Another angle would be to look at the libgit2 tests which emphasize the behavioral contract of each function, or, if you're more familiar with other languages, peek at the test code of some of libgit2 bindings and then dive into the way they're exercising libgit2
      • C# -> LibGit2Sharp
      • Ruby -> Rugged
      • Python -> Pygit2

      这篇关于是否libgit2项目或其他任何人提供样品code演示各种功能libgit2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆