Summary: | Random subfolders and files missing in "Projects" file listing | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Ellie <el> |
Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED NOT A BUG | ||
Severity: | normal | CC: | christoph, waqar.17a |
Priority: | NOR | ||
Version First Reported In: | 24.08.3 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Screenshot of file listing for example given in comment https://bugs.kde.org/show_bug.cgi?id=503129#c5
screenshot_waqar ls_files_output_waqar |
Description
Ellie
2025-04-21 18:15:31 UTC
Are the files in the .gitignore list? Sometimes they are, sometimes they aren't. For example ".gitignore" itself is missing in one project, and it's not part of the ".gitignore" listing. (In reply to Ellie from comment #2) > Sometimes they are, sometimes they aren't. For example ".gitignore" itself > is missing in one project, and it's not part of the ".gitignore" listing. If they are in the .gitignore that would be expected behavior. If not that is a bug, but I can't reproduce this here. Is there a toggle to turn that off? For what it's worth, in some other project of mine, files are listed that are clearly also in the .gitignore but this makes more sense to me. I tested some more, here seems to be some way to reproduce it on my machine: mkdir ~/sometest/ cd ~/sometest/ git clone https://codeberg.org/Horse64/core.horse64.org cd core.horse64.org mkdir ./horse_modules Then open the folder ~/sometest/core.horse64.org/ in kate. On my machine, there is no ".gitignore" and no ".gitattributes" even though neither are on the git ignore list, and there's a "horse_modules" folder even though that one is on the git ignore list (although I personally think that's good). I don't think we will show empty folder for git based projects. We use git ls-files to get the files. Created attachment 180537 [details] Screenshot of file listing for example given in comment https://bugs.kde.org/show_bug.cgi?id=503129#c5 The output doesn't seem to match what git ls-files gives me with the example folder specified here: https://bugs.kde.org/show_bug.cgi?id=503129#c5 Not that I want it to, I just want to see listed what's in the folder. ".gitignore" is listed by git ls-files for example, but it's not in the screenshot. Created attachment 180550 [details] screenshot_waqar Screenshot and git ls-files output on my machine with the commands in comment #5. Git version: git version 2.49.0 Kate version: kate 25.07.70 Created attachment 180551 [details]
ls_files_output_waqar
Output of git ls-files
Maybe you have a global .gitignore (check using: `git config get --global core.excludesFile`) or a different git version. But otherwise this is working as expected. git config get --global core.excludesFile outputs nothing, and ".gitignore" still isn't visible. Also, "horse_modules" is visible even though you say it's not meant to be. That doesn't seem to be working as expected. > That doesn't seem to be working as expected.
Working as expected for me. See my screenshot.
I would suggest that you compare ls files output with my ls files output (attached). If its not same, then its not a Kate bug. Also, you can disable auto loading of git repos in the settings dialog. My apologies for the misunderstanding on my end. As I explained in https://bugs.kde.org/show_bug.cgi?id=503129#c7 the listing doesn't match up for me given the example given in https://bugs.kde.org/show_bug.cgi?id=503129#c5 . When I run git ls-files it 1. lists ".gitignore" (missing in kate, as you can see in my screenshot), and 2. doesn't list "horse_modules" (visible in kate, see my screenshot). ~/sometest/core.horse64.org$ git ls-files | grep horse_modules tests/compile-fail/import-self-not-allowed/horse_modules/empty.txt tests/run/args/horse_modules/empty.txt tests/run/basic-1/horse_modules/empty.txt tests/run/basic-2/horse_modules/empty.txt tests/run/cyclic-base/horse_modules/empty.txt tests/run/extend/horse_modules/empty.txt tests/run/later-nested-rescue-with/horse_modules/empty.txt tests/run/later/horse_modules/empty.txt tests/run/modinit/horse_modules/empty.txt tests/run/rescue/horse_modules/empty.txt tests/run/simple-base/horse_modules/empty.txt translator/translator-h64-runtests/run/args/horse_modules/empty.txt translator/translator-h64-runtests/run/basic-1/horse_modules/empty.txt translator/translator-h64-runtests/run/basic-2/horse_modules/empty.txt translator/translator-h64-runtests/run/cyclic-base/horse_modules/empty.txt translator/translator-h64-runtests/run/extend/horse_modules/empty.txt translator/translator-h64-runtests/run/later-nested-rescue-with/horse_modules/empty.txt translator/translator-h64-runtests/run/later/horse_modules/empty.txt translator/translator-h64-runtests/run/modinit/horse_modules/empty.txt translator/translator-h64-runtests/run/rescue/horse_modules/empty.txt translator/translator-h64-runtests/run/simple-base/horse_modules/empty.txt ~/sometest/core.horse64.org git ls-files | grep gitignore .gitignore However, regarding "Also, you can disable auto loading of git repos in the settings dialog" I already did that, and that seems to be part of the problem. It seems to be the case that when auto loading of git repos is disabled, some files are still hidden. Is it perhaps based on them starting with a dot? I'm not sure what exactly is going on here. ... I think you have disabled "Autoload repositories" -> Git". I can reproduce your problem if I disable that setting. So this bug has nothing to do with Git. To fix this: - Either enable the setting, so you will see what the repo has as per git. - Add a manual `.kateproject` file, and enable "hidden" files: ``` { "name": "my_project_name", "files": [ { "git": false, "hidden": true } ], "recursive": true } ``` @Christoph Do you think we should show "hidden" files by default when loading folders? > ... I think you have disabled "Autoload repositories" -> Git". I can reproduce your problem if I disable that setting.
That seems to be the case. I think I was trying to make the missing files show up, and then just others disappeared and reappeared, so I didn't realize there was a system to it. My apologies, but I'm glad this part is cleared up. Thanks so much for the input so far.
> @Christoph Do you think we should show "hidden" files by default when
> loading folders?
Not sure about that, you get just a 50:50 chance that this will annoy others that want the current behavior, I would rather keep that as is.
I suspect it would at least be less surprising to people new to kate, since many dot files are essential, like .gitignore, and them being missing with no explanation is quite baffling. (Also with git integration enabled they aren't missing, making this change even more baffling.) As for people not new to kate, of course somebody's always going to find one way or the other better. If you have a .gitignore, you have some git and the git auto open is default on, that should then be no issue. That isn't practical for me however, since I frequently need to edit the files not tracked by git as well. I don't think that's a rare requirement. |