Commit 1f03e7f
committed
Fix other submodule.base parent_commit annotations
This finishes the work in git.objects.submodule.base begun in
1541c62. Some remaining occurrences of the old Commit_ish type are
in git.objects.submodule.root, which still need to be replaced.
Even once that is done, this will not have fixed #1869, though it
will be somewhat mitigated because each method's annotations
related to parent_commit will reflect the types that can actually
be used reliably under the current implementation, even if in some
cases that may not be as broad as was meant, or hoped, to be
supported. I expect this may lead the way to a fix for #1869, since
the existing behavior and relationships will be clearer.
Where the old Commit_ish annotations were changed here to "Commit",
it reflects assumptions found by examining the implementation that
other alternatives are not usable becuse something beloning to a
Commit is used and no conversion or fallback is performed for it.
Where a commit is looked up (which uses rev_parse), broader types
are annotated. Where the argument is used without conversion and
must have a `tree` attribute, it must be a Commit. Where the
argument could be broader but must be compared meaningfully with
something known to be a commit, it must at minimum have a binsha
attribute to allow that equality comparison, implemented in Object,
to be meaningful, so in such cases its type cannot include str.1 parent 1541c62 commit 1f03e7f
1 file changed
+16
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
47 | 56 | | |
48 | | - | |
| 57 | + | |
49 | 58 | | |
50 | 59 | | |
51 | 60 | | |
| |||
113 | 122 | | |
114 | 123 | | |
115 | 124 | | |
116 | | - | |
| 125 | + | |
117 | 126 | | |
118 | 127 | | |
119 | 128 | | |
| |||
145 | 154 | | |
146 | 155 | | |
147 | 156 | | |
148 | | - | |
149 | 157 | | |
150 | 158 | | |
151 | 159 | | |
| |||
214 | 222 | | |
215 | 223 | | |
216 | 224 | | |
217 | | - | |
| 225 | + | |
218 | 226 | | |
219 | 227 | | |
220 | 228 | | |
| |||
265 | 273 | | |
266 | 274 | | |
267 | 275 | | |
268 | | - | |
| 276 | + | |
269 | 277 | | |
270 | 278 | | |
271 | 279 | | |
| |||
278 | 286 | | |
279 | 287 | | |
280 | 288 | | |
281 | | - | |
| 289 | + | |
282 | 290 | | |
283 | 291 | | |
284 | 292 | | |
| |||
0 commit comments