[PATCH] git: fix handling of git submodule links with incomplete configuration
Valentin Kleibel
valentin at vrvis.at
Fri Apr 10 13:31:32 UTC 2026
Hi,
We recently noticed that submodule links in a git repo which are not
correctly referenced in .gitmodules will produce a "500 Server Error".
The Error also breaks search indexing and likely some other functions.
To reproduce just add a submodule in a git repo, rm .gitmodules and
commit this change.
If a git object is a submodule link kallithea tries to resolve the
submodule url via the repos' .gitmodules file. A missing file, missing
section or a missing url for that submodule will raise either KeyError
or ValueError in kallithea/lib/vcs/backends/git/changeset.py lines
402-403 and 441-442.
Attached is a patch to catch these errors and set url=None in this case.
Valentin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: git_unconfigured_submodule.patch
Type: text/x-patch
Size: 2124 bytes
Desc: not available
URL: <http://lists.sfconservancy.org/pipermail/kallithea-general/attachments/20260410/98bec1d6/attachment.bin>
More information about the kallithea-general
mailing list