Method: Gitgo::Repo#each
- Defined in:
- lib/gitgo/repo.rb
#each ⇒ Object
Yields the sha of each document in the repo, in no particular order and with duplicates for every link/update that has multiple association sources.
419 420 421 422 423 424 425 426 427 428 429 430 431 432 |
# File 'lib/gitgo/repo.rb', line 419 def each git.tree.each_pair(true) do |ab, xyz_tree| next unless ab.length == 2 xyz_tree.each_pair(true) do |xyz, target_tree| source = "#{ab}#{xyz}" target_tree.keys.each do |target| doc_sha = assoc_sha(source, target) yield(doc_sha) if doc_sha end end end end |