Class: MultiGit::GitBackend::Tree
- Includes:
- Tree
- Defined in:
- lib/multi_git/git_backend/tree.rb
Constant Summary collapse
- LS_TREE_REGEX =
/^([0-7]{6}) (?:blob|tree|commit) (\h{40})\t(.+)$/
Instance Attribute Summary
Attributes included from Object
Instance Method Summary collapse
Methods included from Tree
Methods included from Object
#bytesize, #content, #to_builder, #to_io
Methods included from Utils::AbstractMethods
Methods included from Tree::Base
#==, #each, #entries, #entry, #glob, #hash, #key?, #names, #size, #traverse, #type
Methods included from Walkable
Instance Method Details
#raw_entries ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/multi_git/git_backend/tree.rb', line 10 def raw_entries @raw_entries ||= begin @git.call('ls-tree', oid) do |stdout| stdout.each_line.map do |line| raise unless LS_TREE_REGEX =~ line [$3,$1.to_i(8),$2] end end end end |