Hack hack hack...

An open journal-- some of it written for you, but most of it is for me.

Rugged

Gists were redesigned with libgit2 gem with Rugged.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#In IRB
require 'rugged'
#git init the repo then...
repo = Rugged::Repository.new('/file/path')

#what worked
index = repo.index
repo.bare?
repo.empty?
tree= repo.lookup( repo.index.write_tree ) 

#what didnt
oid = rugged.write("This is a blob.", :blob) #didnt recognize rugged
parents=[ repo.lookup( repo.head.target ).oid ]

In this StackOverflow question there seem to be some issues with the 0.16 build. They suggest to use the gem install --prerelease rugged for commits.

Comments