code: func runCatFileBatchCheck(smallRevCh chan string, lockableCh chan string, lockableSet *lockableNameSet, revs *StringChannelWrapper, errCh chan error) error {
  	cmd, err := git.CatFile()
  	if err != nil {
  		return err
  	}
  
  	go func() {
  		scanner := &catFileBatchCheckScanner{s: bufio.NewScanner(cmd.Stdout), limit: blobSizeCutoff}
  		for r := range revs.Results {
  			cmd.Stdin.Write([]byte(r + "\n"))
  			hasNext := scanner.Scan()
  			if err := scanner.Err(); err != nil {
  				errCh <- err
  			} else if b := scanner.LFSBlobOID(); len(b) > 0 {
  				smallRevCh <- b
  			} else if b := scanner.GitBlobOID(); len(b) > 0 {
  				if name, ok := lockableSet.Check(b); ok {
  					lockableCh <- name
  				}
  			}
  
  			if !hasNext {
  				break
  			}
  		}
  
  		if err := revs.Wait(); err != nil {
  			errCh <- err
  		}
  		cmd.Stdin.Close()
  
  		stderr, _ := ioutil.ReadAll(cmd.Stderr)
  		err := cmd.Wait()
  		if err != nil {
  			errCh <- fmt.Errorf("Error in git cat-file --batch-check: %v %v", err, string(stderr))
  		}
  		close(smallRevCh)
  		close(errCh)
  	}()
  
  	return nil
  }
docs: // runCatFileBatchCheck uses 'git cat-file --batch-check' to get the type and
  // size of a git object. Any object that isn't of type blob and under the
  // blobSizeCutoff will be ignored, unless it's a locked file. revs is a channel
  // over which strings containing git sha1s will be sent. It returns a channel
  // from which sha1 strings can be read.