Commit 1541c62
committed
Start on fixing Submodule parent_commit annotations
These used the old Commit_ish. They may not all be the same as each
other, since they perform different validation and some will look
up a commit while others do not. In particular, this is complicated
by how Submodile.__init__ documents its parent_commit parameter: it
says to see the set_parent_commit method. But __init__ sets the
_parent_commit attribute to parent_commit, while set_parent_commit
treats its commit parameter differently, calling self.repo.commit
on it to get get a Commit object from it even if it wasn't one to
begin with. See #1869 for full details.
There may be some other subtleties as well. A number of uses of the
of the old Commit_ish type appear in git.submodule.base, all
related to parent_commit. These are all remaining references to it
(identifiable due to the rename to Old_commit_ish done in 04a2753),
though. So once the changes begun here for git.submodule.* are
done, that will also have completed the broader replacement effort
begun in 7328a00. At that point cleanup can be done in git.types
(removing Old_commit_ish introduced in 04a2753, replacing
Lit_old_commit_ish with a possibly-updated and deprecated
Lit_commit_ish to avoid a breaking change, and possibly making
further refinements to additions to the newly added docstrings).1 parent 5b2869f commit 1541c62
1 file changed
+8
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
102 | | - | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
1242 | 1243 | | |
1243 | 1244 | | |
1244 | 1245 | | |
1245 | | - | |
| 1246 | + | |
1246 | 1247 | | |
1247 | 1248 | | |
1248 | 1249 | | |
| |||
1495 | 1496 | | |
1496 | 1497 | | |
1497 | 1498 | | |
1498 | | - | |
| 1499 | + | |
1499 | 1500 | | |
1500 | 1501 | | |
1501 | 1502 | | |
| |||
1557 | 1558 | | |
1558 | 1559 | | |
1559 | 1560 | | |
1560 | | - | |
1561 | | - | |
| 1561 | + | |
| 1562 | + | |
1562 | 1563 | | |
1563 | 1564 | | |
1564 | 1565 | | |
| |||
0 commit comments