Fold the Git tree into the tree OID the prospective gate must compare against: the complete Git tree MINUS the entries the versioned conversion policy declares Shim-private (`.atomic*/`, `.vault/`). No tracked path is ever stripped: RFC tree-fidelity (§8.4 table, line 648) and the colocated status contract (line 844) say tracked entries are never excluded by ignore rules (review ::26 R1/R2). Raw c
(policy: &ConversionPolicy, raw_path: &[u8])
| 1215 | // (`"<mode> <name>\0<oid>"`, git tree-name ordering) so raw non-UTF-8 |
| 1216 | // names and literal `%`-escape lookalikes survive byte-exact. |
| 1217 | fn is_excluded(policy: &ConversionPolicy, raw_path: &[u8]) -> bool { |
| 1218 | if let Ok(path) = RepoPath::from_bytes(raw_path) { |
| 1219 | return policy.exclusions.exclusion(&path).is_some(); |
| 1220 | } |
| 1221 | false |
| 1222 | } |
| 1223 | |
| 1224 | /// Canonical Git tree-object encoding for one directory's entries: |
| 1225 | /// `"<mode:o> <name>\0<oid-raw>"` per entry, in git tree-name order |