code: func (s *ObjectStorage) getFromPackfile(h plumbing.Hash, canBeDelta bool) (
  	plumbing.EncodedObject, error) {
  
  	if err := s.requireIndex(); err != nil {
  		return nil, err
  	}
  
  	pack, hash, offset := s.findObjectInPackfile(h)
  	if offset == -1 {
  		return nil, plumbing.ErrObjectNotFound
  	}
  
  	idx := s.index[pack]
  	p, err := s.packfile(idx, pack)
  	if err != nil {
  		return nil, err
  	}
  
  	if !s.options.KeepDescriptors && s.options.MaxOpenDescriptors == 0 {
  		defer ioutil.CheckClose(p, &err)
  	}
  
  	if canBeDelta {
  		return s.decodeDeltaObjectAt(p, offset, hash)
  	}
  
  	return s.decodeObjectAt(p, offset)
  }
docs: // Get returns the object with the given hash, by searching for it in
  // the packfile.