code: func New(env Environment, gitdir, workdir, lfsdir string, repoPerms os.FileMode) *Filesystem {
  	fs := &Filesystem{
  		GitStorageDir: resolveGitStorageDir(gitdir),
  	}
  
  	fs.ReferenceDirs = resolveReferenceDirs(env, fs.GitStorageDir)
  
  	if len(lfsdir) == 0 {
  		lfsdir = "lfs"
  	}
  
  	if filepath.IsAbs(lfsdir) {
  		fs.LFSStorageDir = lfsdir
  	} else {
  		fs.LFSStorageDir = filepath.Join(fs.GitStorageDir, lfsdir)
  	}
  
  	fs.repoPerms = repoPerms
  
  	return fs
  }
docs: // New initializes a new *Filesystem with the given directories. gitdir is the
  // path to the bare repo, workdir is the path to the repository working
  // directory, and lfsdir is the optional path to the `.git/lfs` directory.
  // repoPerms is the permissions for directories in the repository.