[PATCH] git: fix handling of git submodule links with incomplete configuration
Mads Kiilerich
mads at kiilerich.com
Fri Apr 10 19:40:33 UTC 2026
Hi
Thanks. Pushed that to stable.
That area of Kallithea has some dirty code to support a dirty feature.
This simple fix seems good enough.
/Mads
On 10/04/2026 15:31, Valentin Kleibel wrote:
> 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
>
> _______________________________________________
> kallithea-general mailing list
> kallithea-general at sfconservancy.org
> https://lists.sfconservancy.org/mailman/listinfo/kallithea-general
More information about the kallithea-general
mailing list