Bug 472840 - Kate hides files in Project view due to .gitignore
Summary: Kate hides files in Project view due to .gitignore
Status: RESOLVED NOT A BUG
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: 23.04.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-31 13:13 UTC by Giovanni Santini
Modified: 2023-08-04 08:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Giovanni Santini 2023-07-31 13:13:36 UTC
SUMMARY
I tried to use Kate for editing my Arch packages Git repository:
https://github.com/ItachiSan/linux_packaging
When opening the relevant folder in Kate, the files excluded from Git via .gitignore are completely missing in the Project view.
I would expect them to be colored as hidden, however I have no way to access them if not by activating the File System plugin, which is subpar. 

STEPS TO REPRODUCE
1. Open a cloned Git repository

OBSERVED RESULT
The files ignored via .gitignore are completely hidden in the UI.
There is no setting nor toggle for enabling their visualization.

EXPECTED RESULT
Make the files visible, with a slight different color that shows they are gitignored.
Allow hiding them via a toggle or a plugin settings.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: ArchLinux, with kernel 6.47-arch1-1
(available in About System)
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
Comment 1 Waqar Ahmed 2023-07-31 14:11:24 UTC
You need to disable "Auto load -> git" in project settings and then load a folder.

Alternatively put a `.kateproject` file a the root of the folder with following content:
```
{
  "name": "project name",
  "files": [ { "git": 0 } ],
  "exclude_patterns": [ "regex to exclude" ],
}
```
Check the kate docs for more info about .kateproject file or see the ref file at `/usr/share/kateproject/kateproject.example`
Comment 2 Giovanni Santini 2023-07-31 20:11:22 UTC
Hi Waqar,

(In reply to Waqar Ahmed from comment #1)
> You need to disable "Auto load -> git" in project settings and then load a
> folder.
> 

Does this limit any built-in Git functionality in Kate?
Comment 3 Waqar Ahmed 2023-08-01 06:47:17 UTC
> Does this limit any built-in Git functionality in Kate?

No. It might be a bit slower to load the directory though but won't be noticeable for small-medium projects.
Comment 4 Giovanni Santini 2023-08-04 08:03:10 UTC
I would recommend adding such information somewhere as it is quite confusing that disabling the Git functionality does not actually disable it :)