code: func configureCustomAdapters(git Env, m *Manifest) {
  	pathRegex := regexp.MustCompile(`lfs.customtransfer.([^.]+).path`)
  	for k, _ := range git.All() {
  		match := pathRegex.FindStringSubmatch(k)
  		if match == nil {
  			continue
  		}
  
  		name := match[1]
  		path, _ := git.Get(k)
  		// retrieve other values
  		args, _ := git.Get(fmt.Sprintf("lfs.customtransfer.%s.args", name))
  		concurrent := git.Bool(fmt.Sprintf("lfs.customtransfer.%s.concurrent", name), true)
  		direction, _ := git.Get(fmt.Sprintf("lfs.customtransfer.%s.direction", name))
  		if len(direction) == 0 {
  			direction = "both"
  		} else {
  			direction = strings.ToLower(direction)
  		}
  
  		// Separate closure for each since we need to capture vars above
  		newfunc := func(name string, dir Direction) Adapter {
  			standalone := m.standaloneTransferAgent != ""
  			return newCustomAdapter(m.fs, name, dir, path, args, concurrent, standalone)
  		}
  
  		if direction == "download" || direction == "both" {
  			m.RegisterNewAdapterFunc(name, Download, newfunc)
  		}
  		if direction == "upload" || direction == "both" {
  			m.RegisterNewAdapterFunc(name, Upload, newfunc)
  		}
  	}
  }
docs: // Initialise custom adapters based on current config