pub fn staged_fallbacks(
work_tree: &Path,
index_path: &Path,
common_dir: &Path,
hash: Kind,
ignore_case: bool,
) -> Vec<StagedAttributes>Expand description
The .gitattributes files git would read from the index for check-in.
One entry per .gitattributes recorded in the index whose working-tree file
is absent; a file that is present wins outright on the check-in side, so it
is not listed here at all. The name is compared the way git looks it up:
byte-exact, or ASCII-case-folded when core.ignorecase is set — the same
split the resolver itself applies to pattern matching.
Everything that cannot be read answers with an empty list rather than an
error, and that direction is deliberate: the resolver’s one consumer that
must never grow a false refusal is the filter, and a missing fallback only
ever reproduces the pre-2026-08-05 behaviour. status reports an unreadable
index through its own undetermined section, not through this.