Repository navigation
Commit 453f449
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 6d0889d commit 453f449
11 files changed
Lines changed: 236 additions & 101 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | | - | |
| 122 | + | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| |||
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
172 | | - | |
173 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
| |||
340 | 342 | | |
341 | 343 | | |
342 | 344 | | |
343 | | - | |
| 345 | + | |
344 | 346 | | |
345 | 347 | | |
346 | 348 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 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 | + | |
57 | 98 | | |
58 | 99 | | |
59 | 100 | | |
| |||
114 | 155 | | |
115 | 156 | | |
116 | 157 | | |
117 | | - | |
| 158 | + | |
118 | 159 | | |
119 | 160 | | |
120 | 161 | | |
| |||
162 | 203 | | |
163 | 204 | | |
164 | 205 | | |
165 | | - | |
166 | 206 | | |
167 | 207 | | |
168 | 208 | | |
| |||
188 | 228 | | |
189 | 229 | | |
190 | 230 | | |
191 | | - | |
| 231 | + | |
192 | 232 | | |
193 | 233 | | |
194 | 234 | | |
| |||
315 | 355 | | |
316 | 356 | | |
317 | 357 | | |
318 | | - | |
319 | 358 | | |
320 | 359 | | |
321 | 360 | | |
| |||
361 | 400 | | |
362 | 401 | | |
363 | 402 | | |
364 | | - | |
365 | 403 | | |
366 | 404 | | |
367 | 405 | | |
| |||
397 | 435 | | |
398 | 436 | | |
399 | 437 | | |
400 | | - | |
401 | 438 | | |
402 | 439 | | |
403 | 440 | | |
| |||
491 | 528 | | |
492 | 529 | | |
493 | 530 | | |
494 | | - | |
495 | 531 | | |
496 | 532 | | |
497 | 533 | | |
| |||
620 | 656 | | |
621 | 657 | | |
622 | 658 | | |
623 | | - | |
624 | 659 | | |
625 | 660 | | |
626 | 661 | | |
| |||
757 | 792 | | |
758 | 793 | | |
759 | 794 | | |
760 | | - | |
761 | 795 | | |
762 | 796 | | |
763 | 797 | | |
| |||
776 | 810 | | |
777 | 811 | | |
778 | 812 | | |
779 | | - | |
780 | 813 | | |
781 | 814 | | |
782 | 815 | | |
| |||
863 | 896 | | |
864 | 897 | | |
865 | 898 | | |
866 | | - | |
867 | 899 | | |
868 | 900 | | |
869 | 901 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1135 | 1135 | | |
1136 | 1136 | | |
1137 | 1137 | | |
1138 | | - | |
1139 | 1138 | | |
1140 | 1139 | | |
1141 | 1140 | | |
| |||
1149 | 1148 | | |
1150 | 1149 | | |
1151 | 1150 | | |
| 1151 | + | |
1152 | 1152 | | |
1153 | 1153 | | |
1154 | 1154 | | |
| |||
0 commit comments