LibGit
A Smalltalk Binding for libgit2
Install / Use
/learn @smarr/LibGitREADME
This repo is outdated. The latest fork is to be found here: https://github.com/theseion/LibGit (2014-09-25)
LibGit - A Smalltalk Binding for libgit2
LibGit aims to be an object-oriented and complete binding for the libgit2 library for Pharo and Squeak Smalltalk. It is based on the NativeBoostFFI and requires a CogVM with NativeBoost support.
Installation
LibGit requires VM-support for NativeBoost. Suitable VMs are available from the Pharo project: NBCog
Currently, LibGit is developed on Pharo 2.0 and is not tested with Squeak.
Furthermore, it requires a recent version of NativeBoost with support for C enums. To install a suitable version of NativeBoost and the latest version of LibGit execute the following expression:
Gofer new
smalltalkhubUser: 'StefanMarr' project: 'LibGit';
package: #ConfigurationOfLibGit;
load.
(Smalltalk at: #ConfigurationOfLibGit) loadBleedingEdge.
Usage
While LibGit is currently in the prototyping phase, a few simple things are already possible. Try the following simple queries on a git repository of your choice:
repo := LGitRepository on: '~/tmp/libgit' asFileReference. "Open the repo"
repo branches. "get a list of branches"
head := repo head. "look up the HEAD"
head isHead. "some basic info"
head name.
"look up the corresponding commit"
commit := head commit.
commit author.
commit committer.
commit message.
commit time.
Current Status
LibGit is currently just a simple prototype of a libgit2 binding. The goal is to have a fully object-oriented binding that can be the backend for a Monticello repository based on FileTree. However, most of the required functionality is still missing and contributions are welcome.
The source code of LibGit is maintained on SmalltalkHub and mirrored to GitHub.
License
LibGit is published under the MIT license. All contributions to this project are automatically under the MIT license if not stated otherwise.
Acknowledgements
The provided bindings are based on bindings generated by Ciprian Teodorov's TalkFFI. The manual adaptation were mainly applied to streamline the interface and avoid non-essential dependencies.
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
