code: func (r *UploadPackResponse) Decode(reader io.ReadCloser) error {
  	buf := bufio.NewReader(reader)
  
  	if r.isShallow {
  		if err := r.ShallowUpdate.Decode(buf); err != nil {
  			return err
  		}
  	}
  
  	if err := r.ServerResponse.Decode(buf, r.isMultiACK); err != nil {
  		return err
  	}
  
  	// now the reader is ready to read the packfile content
  	r.r = ioutil.NewReadCloser(buf, reader)
  
  	return nil
  }
docs: // Decode decodes all the responses sent by upload-pack service into the struct
  // and prepares it to read the packfile using the Read method