Skip to content
Newer
Older
100644 22 lines (17 sloc) 443 Bytes
a8d4129 @schacon rearranged and commented the repository GitRuby file
schacon authored
1 require File.join(File.dirname(__FILE__), *%w[.. lib grit])
2 include Grit
2ac1712 @mojombo add lazy computation of tree contents
mojombo authored
3
a8d4129 @schacon rearranged and commented the repository GitRuby file
schacon authored
4 def recurse(tree, indent = "")
5 tree.contents.each do |c|
6 case c
7 when Tree
8 # puts "#{indent}#{c.name} (#{c.id})"
9 recurse(c, indent + " ")
10 end
11 end
12 end
13
14 10.times do
15 r = Repo.new("/Users/schacon/projects/ambition")
16 t = r.tree
17
18 recurse(t)
19 end
20
21 #500.times { puts `git --git-dir /Users/schacon/projects/ambition/.git ls-tree master` }
Something went wrong with that request. Please try again.