async function _readTree({
  fs,
  cache,
  gitdir,
  oid,
  filepath = undefined,
}) {
  if (filepath !== undefined) {
    oid = await resolveFilepath({ fs, cache, gitdir, oid, filepath })
  }
  const { tree, oid: treeOid } = await resolveTree({ fs, cache, gitdir, oid })
  const result = {
    oid: treeOid,
    tree: tree.entries(),
  }
  return result
}
@param {object} args
@param {import('../models/FileSystem.js').FileSystem} args.fs
@param {any} args.cache
@param {string} args.gitdir
@param {string} args.oid
@param {string} [args.filepath]

@returns {Promise<ReadTreeResult>}