Repository navigation
Commit 47afff2
perf(gix): resolve fixed metadata paths from the native Git directory
GitPython asks `--git-path` for `modules` and `COMMIT_EDITMSG`. Git's
`path.c` keeps these fixed leaves in the private Git directory, including
linked worktrees; the location is already available from Gix. Resolve the
repository's canonical Git directory through Gix and append only those two
leaf names. Use the existing `to_native_path_linux()` formatter for Git's
forward-slash output on Windows. This is the native-location adaptation
permitted by `AGENTS.md`.
Keep arbitrary metadata names on Git, since objects, indexes, hooks and other
paths have separate configuration/environment or common-directory rules.
Symlinked metadata leaves also retain CLI canonicalization, including dangling
targets. Do not implement the general Git path resolver in Python.
Each ordinary fixed-path lookup drops from one CLI launch to zero. Regression
tests forbid launches for both names across normal, bare and linked worktrees,
including a bare main repository, and compare all returned paths with Git.
Additional cases require CLI for metadata symlinks and an unconverted path.
Validation: affected metadata/submodule/commit-message tests passed with Gix
first (87 passed in 27.87s), plus 2 fallback cases in 0.16s, then CLI
(81 passed, 1 skipped in 62.10s). After applying the shared path formatter,
the focused checks passed again with Gix first (9 passed in 1.58s), then CLI
(3 passed, 1 skipped in 0.94s). Ruff lint/format and `git diff --check` passed.
The ledger now identifies only the remaining general-resolution requirements.1 parent 6165116 commit 47afff2
3 files changed
Lines changed: 53 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
| 422 | + | |
422 | 423 | | |
423 | 424 | | |
424 | 425 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
227 | 238 | | |
228 | 239 | | |
229 | 240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
194 | 232 | | |
195 | 233 | | |
196 | 234 | | |
| |||
217 | 255 | | |
218 | 256 | | |
219 | 257 | | |
220 | | - | |
| 258 | + | |
| 259 | + | |
221 | 260 | | |
222 | 261 | | |
223 | 262 | | |
| |||
0 commit comments