Bug 447530 - Untracked empty folders in a git repo are wrongly shown with the 'up-to-date' icon
Summary: Untracked empty folders in a git repo are wrongly shown with the 'up-to-date'...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: plugins: git (show other bugs)
Version: 21.12.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Dörner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-26 08:58 UTC by Kishore Gopalakrishnan
Modified: 2024-05-28 14:34 UTC (History)
4 users (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 Kishore Gopalakrishnan 2021-12-26 08:58:04 UTC
STEPS TO REPRODUCE
1. In Settings > Configure Dolphin > Context menu, enable 'Git'
2. Open any git repo in Dolphin
3. Create a new folder

OBSERVED RESULTS
Even though the new folder contains no tracked files, it is shown with the 'green tick' icon. Also note that its context menu shows items such as 'git remove'.

EXPECTED RESULTS
Similar to untracked files, empty (untracked) folders should be shown without the tick. 'git remove' in the context menu should be greyed-out for such folders.

SOFTWARE VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.2
Kernel Version: 5.15.11-arch2-1 (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
Comment 1 Kishore Gopalakrishnan 2021-12-26 09:00:54 UTC
Ooops, forgot the summary

SUMMARY
When a git repo contains an empty (untracked) folder, Dolphin wrongly shows it with the 'green tick' icon that is used to signify tracked files/folders that have no uncommitted changes.
Comment 2 Aldo Latino 2024-03-10 06:28:52 UTC
I confirm this bug also in Plasma 6.0.1
Comment 3 Ivan Jurišić 2024-04-04 09:00:39 UTC
I confirm this bug also in Debian 12 Bookworm,

KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.0-18-amd64
Debian package name: dolphin-plugins, Version: 22.12.3-1
Comment 4 Bug Janitor Service 2024-05-22 14:05:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/sdk/dolphin-plugins/-/merge_requests/72
Comment 5 Nikolai Krasheninnikov 2024-05-28 14:34:29 UTC
Git commit 29a6aff76d1a4dc9b236b75b359d4e97d2d0b987 by Nikolai Krasheninnikov.
Committed on 28/05/2024 at 14:34.
Pushed by nikolaik into branch 'master'.

git: untracked empty dirs are no longer shown as versioned

As git can't add empty dirs, they don't show up in `git status`. We can get
this list from `git ls-files`.

This list is overlapping with `git status` but we can't gain all info
from just one command. So we use both.

M  +10   -1    git/fileviewgitplugin.cpp
M  +23   -0    git/gitwrapper.cpp
M  +10   -0    git/gitwrapper.h

https://invent.kde.org/sdk/dolphin-plugins/-/commit/29a6aff76d1a4dc9b236b75b359d4e97d2d0b987