Bug 515440

Summary: Sometimes nested git repos cannot be opened as project folder
Product: [Applications] kate Reporter: Marcus Minhorst <marcus.minhorst+kde>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 25.12.1   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Re-enactment of me noticing this

Description Marcus Minhorst 2026-02-03 04:57:26 UTC
Created attachment 189175 [details]
Re-enactment of me noticing this

SUMMARY

In one specific case, a nested git repo cannot be opened as the root of a project. Specifically it is when the parent git repo has a pinned file.

STEPS TO REPRODUCE
1. create a nested git folder structure `mkdir -p outer/repos/inner && git init outer && git init outer/repos/inner
 && touch outer/a outer/repos/inner/b`
2. create new kate session, open folder 'outer', pin file 'outer/a', save and close session
3. create new kate session, close (but do not unpin 'outer/a'), open folder 'outer/repos/inner'

OBSERVED RESULT

Projects sidebar only has 'outer' folder open

EXPECTED RESULT

Projects sidebar has 'inner' folder open, and maybe 'outer' folder open in drop-down

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 42
KDE Plasma Version: 6.5.5
KDE Frameworks Version: 6.22.0
Qt Version: 6.9.3

ADDITIONAL INFORMATION

This was noticed when I forget I had a file in the root repo pinned, but wanted to open a subtree (but the actual repo) as separate project.