summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/units/test_raw_internals.rb22
1 files changed, 21 insertions, 1 deletions
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