Summary: | In the projects sidebar, the selectable projects don't include nested git repos depending on the order they were opened in | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Daniel Abrecht <kde> |
Component: | application | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED INTENTIONAL | ||
Severity: | minor | CC: | christoph, waqar.17a |
Priority: | NOR | ||
Version First Reported In: | 22.12.3 | ||
Target Milestone: | --- | ||
Platform: | Debian stable | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Projects dropdown, depending on order projects are opened in |
Atm, when we encounter a directory or a project file (when creating projects), we check if the directory is a subdirectory of any existing project. If it is, then we just use the parent directory project. This is intentional and desired behaviour as far I can tell. The fact that if you open a child git repo first and then the parent repo, is sort of a "hole"/bug in this behaviour. Think what should happen if you open a file in a child git repo, which project should be activated, the child or the parent. I work on projects with hundreds of git submodules, it would massively annoying if there were new projects being created for every git submodule that Kate encountered. Yes, that works as designed, I don't think there is a variant that will make all people happy and I very much prefer the current way of it. |
Created attachment 183570 [details] Projects dropdown, depending on order projects are opened in In the projects sidebar, the selectable projects don't include nested git repos depending on the order they were opened in. I have created a git repo, in which I created multiple git workspaces, which have different branches checked out. If I open them in the terminal like so: `kate ./ workspace1/ workspace2/`, workspace1 and workspace2 are not selectable from the projects dropdown. But if I open them like this: `kate workspace1/ workspace2/ ./` all 3 git repos are selectable from the dropdown. The same thing also happens with git submodules. The same thing also happens when opening files using the GUI. If a file from the sub project is opened, before one of the parent project, both appear in the projects dropdown. If it's done the other way around, only the parent project appears. STEPS TO REPRODUCE 1. Take a git project with nested git repos within, or with submodules 2. Open the child repo before the parent repo: both are in the dropdown 3. Open the parent repo before the child repo: only the parent project is in the dropdown OBSERVED RESULT Which projects become available in the projects dropdown depends on the order they are used if they are nested. EXPECTED RESULT All used projects should be available in the dropdown. SOFTWARE/OS VERSIONS Operating System: Devuan GNU/Linux 5 KDE Plasma Version: 5.27.5 KDE Frameworks Version: 5.103.0 Qt Version: 5.15.8