pub fn resolve_ref_format_with(
context: &GitContext,
cwd: &Path,
snapshot: Option<&ConfigSnapshot>,
) -> Result<RefFormat, GitFailure>Expand description
What:
Reads the ref storage backend, from the configuration snapshot when it proves files.
Why:
rev-parse --show-ref-format prints reftable only for a repository whose configuration names
extensions.refStorage, so a snapshot read without global options that has no such key proves files
without starting Git; any other snapshot, and a missing one, asks Git.
In TS you’d write (pseudocode):
snapshot?.provesFilesRefStorage() ? 'files' : await resolveRefFormat({ gitPath, cwd });