Skip to content
This repository has been archived by the owner on Dec 3, 2018. It is now read-only.

smarr/LibGit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A Smalltalk Binding for libgit2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published