code: func (o *FilterProcessScanner) NegotiateCapabilities() ([]string, error) {
  	reqCaps := []string{"capability=clean", "capability=smudge"}
  
  	supCaps, err := o.pl.readPacketList()
  	if err != nil {
  		return nil, fmt.Errorf("reading filter-process capabilities failed with %s", err)
  	}
  
  	for _, sup := range supCaps {
  		if sup == "capability=delay" {
  			reqCaps = append(reqCaps, "capability=delay")
  			break
  		}
  	}
  
  	for _, reqCap := range reqCaps {
  		if !isStringInSlice(supCaps, reqCap) {
  			return nil, fmt.Errorf("filter '%s' not supported (your Git supports: %s)", reqCap, supCaps)
  		}
  	}
  
  	err = o.pl.writePacketList(reqCaps)
  	if err != nil {
  		return nil, fmt.Errorf("writing filter-process capabilities failed with %s", err)
  	}
  
  	return supCaps, nil
  }
docs: // NegotiateCapabilities executes the process of negotiating capabilities
  // between the filter client and server. If we don't support any of the
  // capabilities given to LFS by Git, an error will be returned. If there was an
  // error reading or writing capabilities between the two, an error will be
  // returned.