Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 1.59 KB

README.md

File metadata and controls

57 lines (39 loc) · 1.59 KB

ruby-ggit

This projet is currently held in abeyance due to a lack of time. Feel free to contribute and extend it.

Ruby loader for libgit2-glib based on the ruby gobject-introspection gem from the ruby-GNOME2 project.

Documentation for libgit2-glib can be found here and documentation for libgit2 can be found here.

Requirements

Examples

From https://libgit2.github.com/docs/guides/101-samples/

Using the library

require "ggit"

Repositories

Init

# initialize with working directory (create and fill .git/)
dir = Gio::File.open(:path => "#{@path}/non_bare_repo/test")
Ggit::Repository.init_repository(dir, false)
# bare
dir = Gio::File.open(:path => "#{@path}/bare_repo/test/.git")
repo = Ggit::Repository.init_repository(dir, true)

Clone

url = "https://github.com/ruby-gnome2/ggit.git"
destination = Gio::File.open(:path => "#{@path}/ggit-clone")
Ggit::Repository.clone(url, destination)

License

Copyright (c) 2016-2018 Ruby-GNOME2 Project Team

This program is free software. You can distribute/modify this program under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.

Project Website

ruby-Ggit