You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
0 commit comments