have the pure ruby bindings working to some degree
[rubygit.git] / tests / units / test_raw_internals.rb
blob4299a2bc04eb7db73c52d34b9963f42f4c744d30
1 #!/usr/bin/env ruby
3 require File.dirname(__FILE__) + '/../test_helper'
5 class TestRawInternals < Test::Unit::TestCase
6   
7   def setup
8     set_file_paths
9   end
10   
11   def test_raw_log
12     g = Git.bare(@wbare)
13     #g.repack
14     
15     c = g.object("HEAD")
16     puts sha = c.sha
17     
18     repo = Git::Raw::Repository.new(@wbare)
19     while sha do
20       o = repo.get_raw_object_by_sha1(sha)
21       c = Git::Raw::Object.from_raw(o)
22     
23       sha = c.parent.first
24       puts sha
25     end
26     
27     g.log(60).each do |c|
28       puts c.sha
29     end
30   
31     puts c.inspect
32     
33   end
35 end