Repository navigation
Commit 81e1c30
committed
core: keep explicit Git URL form when reloading module sources
A module loaded from an explicit Git URL such as
https://host/team/project.git#main:ci can come back as the legacy form
https://host/team/project.git/ci@main. The legacy form no longer says
where the repository ends, so the parser falls back to import-path
discovery. That discovery is unauthenticated and fails for private
self-managed servers.
Two places lose the form:
- Workspace-backed Git modules never set their selector, so AsString,
which nested clients reload, prints the legacy form.
- A local dependency of a Git module always rebuilds its ref with
GitRefString, whatever form the parent used. A version-shaped ref like
v1.2 is then read as a version query.
Mark workspace sources whose clone URL has a scheme as explicit Git URLs,
and move the choice between the two forms into GitModuleSource.RefString,
which AsString and dependency resolution now share. SCP-style refs
(git@host:path) have no scheme and keep the legacy form.
TestGitLocalDependencyPreservesSelector fails on main and passes here.
TestGitWorkspaceModuleSourcePreservesKind now also checks that AsString
parses back to the same clone URL, subpath and selector.
Signed-off-by: Guillaume de Rouville <[email protected]>1 parent ce6dc9f commit 81e1c30
4 files changed
Lines changed: 92 additions & 6 deletions
File tree
- core
- integration
- schema
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
1598 | 1599 | | |
1599 | 1600 | | |
1600 | 1601 | | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
1601 | 1611 | | |
1602 | 1612 | | |
1603 | 1613 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1045 | 1045 | | |
1046 | 1046 | | |
1047 | 1047 | | |
1048 | | - | |
1049 | | - | |
1050 | | - | |
1051 | | - | |
| 1048 | + | |
1052 | 1049 | | |
1053 | 1050 | | |
1054 | 1051 | | |
| |||
2117 | 2114 | | |
2118 | 2115 | | |
2119 | 2116 | | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
2120 | 2126 | | |
2121 | 2127 | | |
2122 | 2128 | | |
| |||
2265 | 2271 | | |
2266 | 2272 | | |
2267 | 2273 | | |
2268 | | - | |
2269 | | - | |
| 2274 | + | |
2270 | 2275 | | |
2271 | 2276 | | |
2272 | 2277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1051 | 1051 | | |
1052 | 1052 | | |
1053 | 1053 | | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
1054 | 1060 | | |
1055 | 1061 | | |
1056 | 1062 | | |
| |||
0 commit comments