Gitlink without `.gitmodules` breaks commit rendering #3061
sev opened 1 day ago

If a project contains a bare gitlink without an associated .gitmodules entry for it, trying to navigate directly to it in the tree or view a commit object where it's modified will break the page. This is because OneDev tries to display the .gitmodules repo for the gitlink and crashes when it can't find it. The page should instead show the commit hash without a clickable URL, perhaps with a "Submodule path not registered in .gitmodules" message next to it or something.

While the main use of the gitlink implementation is for submodules, it technically isn't limited to that use; and it's also possible to erroneously commit a gitlink without the updated .gitmodules file. Git repos using the former are made very difficult to work with, and the latter will have annoying errors when trying to navigate through history until the project is rebased to fix the issue.

1/1
Type
Bug
Priority
Normal
Assignee
Affected Versions
16.5.6
Labels
No labels
Issue Votes (0)
Watchers (2)
Reference
OD-3061
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover