Repository navigation
Commit f437d84
perf(gix): open repositories with supported native metadata
Use `gix.open_opts()` and native accessors for storage, worktree, object-format
and empty-tree metadata. Retain the native handle and leave parent traversal
under `search_parent_directories`. Every candidate reaches Gix before a
discovery decision; do not fabricate rejection from Python `HEAD` checks.
Gix already supplies worktree metadata for linked worktrees of bare main
repositories. Its `is_bare()` reflects inherited configuration, so combine it
with the native worktree's presence for GitPython's bare flag and managed
`--is-bare-repository`. Remove the unnecessary linked-bare fallback. Cover
opening through the worktree, its gitfile, and its administrative directory.
Keep the real format query for Git-compatible repository-extension validation
(`GIX-1`), not because storage cannot be identified. Force native HEAD decoding
and retain common-directory/layout guards and Git diagnostics (`GIX-14`). In
particular, strict native opening still ignores dangling `commondir` symlinks.
Each linked-worktree bare query now drops from one CLI call to zero. Opening
those worktrees uses the normal native path: only the one format-validation
query and executable-version preflight remain. Nested invalid candidates still
need Git diagnostics because GixPython flattens the native error kinds.
Validation: affected opening/discovery/worktree/format/lifetime tests passed
with Gix first (25 passed, 1 skipped, 14 subtests in 4.86s), then CLI
(12 passed, 2 skipped, 14 subtests in 3.20s). Ruff lint/format and
`git diff --check` passed. Replay preserves all opening and safety changes.1 parent 9d283af commit f437d84
11 files changed
Lines changed: 236 additions & 101 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
125 | | - | |
| 124 | + | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| |||
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
175 | | - | |
176 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
177 | 179 | | |
178 | 180 | | |
179 | 181 | | |
| |||
343 | 345 | | |
344 | 346 | | |
345 | 347 | | |
346 | | - | |
| 348 | + | |
347 | 349 | | |
348 | 350 | | |
349 | 351 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
61 | 102 | | |
62 | 103 | | |
63 | 104 | | |
| |||
118 | 159 | | |
119 | 160 | | |
120 | 161 | | |
121 | | - | |
| 162 | + | |
122 | 163 | | |
123 | 164 | | |
124 | 165 | | |
| |||
166 | 207 | | |
167 | 208 | | |
168 | 209 | | |
169 | | - | |
170 | 210 | | |
171 | 211 | | |
172 | 212 | | |
| |||
192 | 232 | | |
193 | 233 | | |
194 | 234 | | |
195 | | - | |
| 235 | + | |
196 | 236 | | |
197 | 237 | | |
198 | 238 | | |
| |||
319 | 359 | | |
320 | 360 | | |
321 | 361 | | |
322 | | - | |
323 | 362 | | |
324 | 363 | | |
325 | 364 | | |
| |||
365 | 404 | | |
366 | 405 | | |
367 | 406 | | |
368 | | - | |
369 | 407 | | |
370 | 408 | | |
371 | 409 | | |
| |||
401 | 439 | | |
402 | 440 | | |
403 | 441 | | |
404 | | - | |
405 | 442 | | |
406 | 443 | | |
407 | 444 | | |
| |||
495 | 532 | | |
496 | 533 | | |
497 | 534 | | |
498 | | - | |
499 | 535 | | |
500 | 536 | | |
501 | 537 | | |
| |||
624 | 660 | | |
625 | 661 | | |
626 | 662 | | |
627 | | - | |
628 | 663 | | |
629 | 664 | | |
630 | 665 | | |
| |||
761 | 796 | | |
762 | 797 | | |
763 | 798 | | |
764 | | - | |
765 | 799 | | |
766 | 800 | | |
767 | 801 | | |
| |||
780 | 814 | | |
781 | 815 | | |
782 | 816 | | |
783 | | - | |
784 | 817 | | |
785 | 818 | | |
786 | 819 | | |
| |||
867 | 900 | | |
868 | 901 | | |
869 | 902 | | |
870 | | - | |
871 | 903 | | |
872 | 904 | | |
873 | 905 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1185 | 1185 | | |
1186 | 1186 | | |
1187 | 1187 | | |
1188 | | - | |
1189 | 1188 | | |
1190 | 1189 | | |
1191 | 1190 | | |
| |||
1199 | 1198 | | |
1200 | 1199 | | |
1201 | 1200 | | |
| 1201 | + | |
1202 | 1202 | | |
1203 | 1203 | | |
1204 | 1204 | | |
| |||
0 commit comments