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
{{ message }}
Repository navigation
Commit cd22bfc
Browse filesBrowse the repository at this point in the historyBrowse files
fix(submodule): apply Git transport policy to recorded URLs
URLs read from `.gitmodules` were cloned and fetched as if a user had
provided them directly. Git rejects `protocol.file.allow=user` for
`git submodule update`, but `Submodule.update` accepted it on both backends.
Port the clone/fetch regression from PR #2304, with a scripted initial
state and live `git submodule update --init` / `--remote` baselines for
denied transfers, allowed transfers, and checked-out commits. Pass
`GIT_PROTOCOL_FROM_USER=0` to these CLI operations. Preserve the existing
explicit unsafe-protocol option and caller-provided clone environment.
Move the existing test config helper so local-submodule tests and tutorials
can request `protocol.file.allow=always` explicitly.
The regression failed on both backends before this change and passes on
both afterward against Git 2.54.0 and GixPython 0.2.0. The submodule,
no-fetch, and docs suites exercised 482 cases per backend; all 476 expected
passing cases passed after the affected docs fixture and host-signing case
were rerun with the isolated runner (5 skips, 1 expected failure).
Ruff lint/format, shellcheck, and `git diff --check` pass. Clone and fetch
remain CLI fallbacks; document the native API gaps without claiming Gix
implements the transport operation.
Copy file name to clipboardExpand all lines: doc/gix-backend.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1108,6 +1108,20 @@ compatibility bug or reduction in CLI calls.
1108
1108
| Config-backed remote/submodule maintenance | Missing config enumeration/multivar/removal operations (GIX-12), plus filesystem and worktree lifecycle requirements. |
1109
1109
| Hook execution | Every explicit hook request, including an absent hook, retains Git-managed lookup, execution and diagnostics until GIX-23 is addressed. Native operations retain GitPython's default hook/fsmonitor/maintenance restrictions. |
1110
1110
1111
+
### Submodule transport policy
1112
+
1113
+
Submodule clone and fetch stay on the CLI and pass `GIT_PROTOCOL_FROM_USER=0`
1114
+
for URLs from `.gitmodules`, matching `git submodule update --init` and
1115
+
`git submodule update --remote`. A `protocol.file.allow=user` policy therefore
1116
+
rejects the file transport, while `always` permits it. The existing explicit
1117
+
`allow_unsafe_protocols=True` opt-in preserves the caller's environment policy;
1118
+
`user` is accepted only when `GIT_PROTOCOL_FROM_USER` is unset or permits it.
1119
+
The regression compares both backends with Git 2.54.0, including unchanged
1120
+
checkouts after denied transfers.
1121
+
GixPython 0.2.0 still needs the clone/environment and fetch-result contracts
1122
+
listed above before these calls can move to Gix. This is a shared GitPython
1123
+
policy bug, not a demonstrated Gix compatibility mismatch.
0 commit comments