# File lib/grit/git-ruby/internal/loose.rb, line 27 def [](sha1) sha1 = sha1.unpack("H*")[0] begin return nil unless sha1[0...2] && sha1[2..39] path = @directory + '/' + sha1[0...2] + '/' + sha1[2..39] get_raw_object(File.open(path, 'rb').read) rescue Errno::ENOENT nil end end