• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

schacon/geef: Git NEEEEF (Erlang NIF)

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

schacon/geef

开源软件地址:

https://github.com/schacon/geef

开源编程语言:

C 76.4%

开源软件介绍:

Geef (Git NIF)

Geef is a simple Erlang NIF that exposes some of the libgit2 library functions to Erlang.

INSTALLING AND RUNNING

First you need to install libgit2:

$ git clone git://github.com/libgit2/libgit2.git
$ cd libgit2
$ make
$ make install

Now, if you have Erlang OTP_R13B04 installed, you can compile this NIF to run in it.

$ git clone git://github.com/schacon/geef.git
$ cd geef
$ make

Now you should have a .beam file you can load. I've also included an example escript to test some of the functions (currently just hex_to_raw and object_exists):

$ ./geef h2r de08fe4884650f067bd5703b8a59a8b3b3c99aaa
Raw: <<222,8,254,72,132,101,15,6,123,213,112,59,138,89,168,179,179,201,154,170>>

$ ./geef exists .git/objects 89c86150c8b164f441a73f4991b2c339fd4aae7c
Exists: true

$ ./geef exists .git/objects 87fcfb277899097823911006f438658ce86b3697
Exists: false

The API looks basically like this:

geef:start().
Raw = geef:hex_to_raw(HexSha).
Exists = geef:object_exists(ObjectsPath, HexSha).

CONTRIBUTING

Fork schacon/geef on GitHub, make it awesomer (preferably in a branch named for the topic), send a pull request.

AUTHORS

Scott Chacon [email protected]

LICENSE

MIT.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap