Method: Grit::GitRuby::Internal::PackStorage#cache_objects

Defined in:
lib/grit/git-ruby/internal/pack.rb

#cache_objectsObject



91
92
93
94
95
96
97
98
99
100
101
# File 'lib/grit/git-ruby/internal/pack.rb', line 91

def cache_objects
  @cache = {}
  with_packfile do |packfile|
    each_entry do |sha, offset|
      data, type = unpack_object(packfile, offset, {:caching => true})
      if data
        @cache[sha] = RawObject.new(OBJ_TYPES[type], data)
      end
    end
  end
end