From 90dea6d415bfc5734bc87c2797b26cca311246bc Mon Sep 17 00:00:00 2001 From: scott Chacon Date: Tue, 20 Nov 2007 13:24:44 -0800 Subject: have the pure ruby bindings working to some degree --- tests/units/test_raw_internals.rb | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'tests/units/test_raw_internals.rb') diff --git a/tests/units/test_raw_internals.rb b/tests/units/test_raw_internals.rb index b135e52..4299a2b 100644 --- a/tests/units/test_raw_internals.rb +++ b/tests/units/test_raw_internals.rb @@ -6,10 +6,30 @@ class TestRawInternals < Test::Unit::TestCase def setup set_file_paths - @git = Git.open(@wdir) end def test_raw_log + g = Git.bare(@wbare) + #g.repack + + c = g.object("HEAD") + puts sha = c.sha + + repo = Git::Raw::Repository.new(@wbare) + while sha do + o = repo.get_raw_object_by_sha1(sha) + c = Git::Raw::Object.from_raw(o) + + sha = c.parent.first + puts sha + end + + g.log(60).each do |c| + puts c.sha + end + + puts c.inspect + end end \ No newline at end of file -- cgit