From 07ebb951368ed31bdaebc2e820c62ced22c8bbe4 Mon Sep 17 00:00:00 2001 From: scott Chacon Date: Tue, 27 Nov 2007 08:06:51 -0800 Subject: added Matthias and Simon to credits for the gitrb code fixed an issue with raw object tree formatting added ls_tree implementation in raw git --- tests/units/test_raw_internals.rb | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (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 1437845..03a7916 100644 --- a/tests/units/test_raw_internals.rb +++ b/tests/units/test_raw_internals.rb @@ -9,14 +9,16 @@ class TestRawInternals < Test::Unit::TestCase end def test_raw_log - g = Git.bare(@wbare) - t_log(g) + with_temp_bare do |g| + t_log(g) + end end def test_packed_log - g = Git.bare(@wbare) - g.repack - t_log(g) + with_temp_bare do |g| + g.repack + t_log(g) + end end def test_commit_object @@ -26,15 +28,27 @@ class TestRawInternals < Test::Unit::TestCase assert_equal('test', c.message) end + def test_lstree + g = Git.bare(@wbare) + c = g.object("v2.5").gtree + sha = c.sha + + repo = Git::Raw::Repository.new(@wbare) + puts repo.object(sha).inspect + end + def t_log(g) c = g.object("v2.5") sha = c.sha - repo = Git::Raw::Repository.new(@wbare) + repo = Git::Raw::Repository.new(g.repo.path) raw_out = repo.log(sha) assert_equal('commit 546bec6f8872efa41d5d97a369f669165ecda0de', raw_out.split("\n").first) assert_equal('546bec6f8872efa41d5d97a369f669165ecda0de', c.log(30).first.sha) end + + + end \ No newline at end of file -- cgit