code: func (c *Client) fixFileWriteFlags(absPath, workingDir string, lockable, unlockable *filepathfilter.Filter) error {
  
  	var errs []error
  	var errMux sync.Mutex
  
  	addErr := func(err error) {
  		errMux.Lock()
  		defer errMux.Unlock()
  
  		errs = append(errs, err)
  	}
  
  	recursor := tools.FastWalkGitRepo
  	if c.ModifyIgnoredFiles {
  		recursor = tools.FastWalkGitRepoAll
  	}
  
  	recursor(absPath, func(parentDir string, fi os.FileInfo, err error) {
  		if err != nil {
  			addErr(err)
  			return
  		}
  		// Skip dirs, we only need to check files
  		if fi.IsDir() {
  			return
  		}
  		abschild := filepath.Join(parentDir, fi.Name())
  
  		// This is a file, get relative to repo root
  		relpath, err := filepath.Rel(workingDir, abschild)
  		if err != nil {
  			addErr(err)
  			return
  		}
  
  		err = c.fixSingleFileWriteFlags(relpath, lockable, unlockable)
  		if err != nil {
  			addErr(err)
  		}
  
  	})
  	return errors.Combine(errs)
  }
docs: // Internal implementation of fixing file write flags with precompiled filters