Bug 483080 - Conflict between Git and Dropbox plugins
Summary: Conflict between Git and Dropbox plugins
Status: CONFIRMED
Alias: None
Product: dolphin
Classification: Applications
Component: plugins: git (show other bugs)
Version: 24.08.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Dörner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-10 06:53 UTC by Aldo Latino
Modified: 2025-01-18 05:44 UTC (History)
5 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 Aldo Latino 2024-03-10 06:53:44 UTC
SUMMARY
When you open a Dolphin window and go inside a directory that is under Git control, the "green check marks" do not appear over the files icons. In order to see these "green check marks", you have to open a new tab in the same window and the green icons (or other icons according to their Git status) appear over the files.

STEPS TO REPRODUCE
1. In Dolphin activate the Git plugin.
2. Open a new Dolphin window.
3. Go inside a directory that is under Git control.
4. The green check marks (or other Git status marks) are not shown.
5. In the same window open a new tab (press CTRL+T).
6. The green check marks (and other status marks) are now correctly shown.

OBSERVED RESULT
Opening a directory that is under Git control does not show the status of the files and directories in the repository using the various marks (green checks, orange up arrow, etc.) according to their status.

EXPECTED RESULT
Opening a directory that is under Git control should show the status of the various files in the repository.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Graphic platform: X11

ADDITIONAL INFORMATION
Comment 1 Nikolai Krasheninnikov 2024-04-02 08:49:07 UTC
Cannot confirm, works as expected on current master.

KDE Plasma Version: 6.1.0
Qt Version: 6.6.3
Graphic platform: X11
Comment 2 Aldo Latino 2024-04-05 18:28:07 UTC
I close this bug because, after the Nikolai's comment, I tested the plugin in a brand new installation and it works as expected. So the problem is in another place, perhaps a conflict with some other setting.
Comment 3 Nikolai Krasheninnikov 2024-04-06 06:30:28 UTC
(In reply to Aldo Latino from comment #2)
> I close this bug because, after the Nikolai's comment, I tested the plugin
> in a brand new installation and it works as expected. So the problem is in
> another place, perhaps a conflict with some other setting.

https://bugs.kde.org/show_bug.cgi?id=450944 looks same, may also be closed
Comment 4 Aldo Latino 2024-04-06 19:02:32 UTC
(In reply to Nikolai Krasheninnikov from comment #3)
> https://bugs.kde.org/show_bug.cgi?id=450944 looks same, may also be closed

Sure, it's the same "bug" report.

In the meantime, I found an interesting thing. In Dolphin, if you activate the option to show your home as starting directory when you open a new instance of Dolphin, the green check marks don't appear over the files in a directory under Git control. If you setup another directory (e.g, /home/user/Desktop), the green check marks appear. And they appear also if you leave active the first option to remember last opened directory and tabs.

In other words, if in dolphinrc config file we have these options together:
HomeUrl=/home/aldo/any-folder
RememberOpenedTabs=false
the green check marks appear.

If we have this option only without "HomeUrl"
RememberOpenedTabs=false
the green check marks don't appear.

Can you confirm this behavior?
Comment 5 Nikolai Krasheninnikov 2024-04-06 20:20:08 UTC
(In reply to Aldo Latino from comment #4)
> In the meantime, I found an interesting thing. In Dolphin, if you activate
> the option to show your home as starting directory when you open a new
> instance of Dolphin, the green check marks don't appear over the files in a
> directory under Git control. If you setup another directory (e.g,
> /home/user/Desktop), the green check marks appear. And they appear also if
> you leave active the first option to remember last opened directory and tabs.
> 
> In other words, if in dolphinrc config file we have these options together:
> HomeUrl=/home/aldo/any-folder
> RememberOpenedTabs=false
> the green check marks appear.
> 
> If we have this option only without "HomeUrl"
> RememberOpenedTabs=false
> the green check marks don't appear.
> 
> Can you confirm this behavior?

Cannot reproduce :(
What I am trying is:
1. open a Dolphin, enable SVN and GIT plugins
2. in the same instance check save state from last time on startup
3. close Dolphin, open new instance, badges are there

I also tried modifying dolphinrc as described, nothing changed, badges are there.
Maybe we closed this one too quickly.
I am on current master.
Comment 6 Aldo Latino 2024-04-07 10:17:51 UTC
Going further in this investigation, I noticed that, if I open Dolphin directly in a folder different from my home, the green check marks appear regularly. If I open Dolphin directly in my home directory, they don't appear.

So it's not a matter of what option is chosen in Dolphin preferences. The situation is that home folder must not be opened immediately when you open Dolphin.

Steps to reproduce:

1) open Dolphin
2) make sure you have activated the option to open the last directory when you close Dolphin
3) close all tabs, leaving only a single tab
4) go to your home directory
4) close Dolphin
5) reopen Dolphin (it should be in your home directory)
6) go to a directory under Git control
7) the green check marks are not displayed

Now another test:

1) open Dolphin
2) make sure you have activated the option to open the last directory when you close Dolphin
3) close all tabs, leaving only a single tab
4) go to any directory different from your home (for example go to Desktop)
5) close Dolphin
6) open Dolphin (it should show your last folder, for example, your Desktop)
7) go to a directory under Git control
8) the green check marks are displayed

This is what happens in my installation.
Comment 7 Nikolai Krasheninnikov 2024-04-07 15:38:46 UTC
Cannot reproduce, always works as expected
Reopen?
Comment 8 Aldo Latino 2024-04-07 16:53:16 UTC
(In reply to Nikolai Krasheninnikov from comment #7)
> Cannot reproduce, always works as expected
> Reopen?

If it works correctly in your computer, the problem is in my installation.
So this is not a bug, I think. :-)
Comment 9 Nikolai Krasheninnikov 2024-04-14 08:57:02 UTC
(In reply to Aldo Latino from comment #8)
> (In reply to Nikolai Krasheninnikov from comment #7)
> > Cannot reproduce, always works as expected
> > Reopen?
> 
> If it works correctly in your computer, the problem is in my installation.
> So this is not a bug, I think. :-)

So the second one is a duplicate and can be also closed.
Comment 10 Paul Worrall 2024-08-18 07:30:30 UTC
I can reproduce this bug so reopening.

It does seem to be triggered if you navigate to the git-controlled folder from your home folder, for example:

1. configure Dolphin to "show state from last time" when it is launched
2. navigate to a git-controlled folder
3. close and reopen Dolphin 

Result: it shows the git-controlled folder from 2 and the git badges are shown

4. click Home under Places and then Back to go back to the git folder

Result: the git badges are not shown

Operating System: Arch Linux 
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Graphics Platform: Wayland
Comment 11 Aldo Latino 2024-08-18 11:07:30 UTC
I had this bug, as you've read, but not today. Even after following all the steps, the bug is no longer present in my installation.
Comment 12 Paul Worrall 2024-09-25 09:57:06 UTC
For me, disabling the Dropbox context menu item seems to have made the git plugin work as expected (even after visiting my home folder), so it looks like there's a conflict between the Dropbox item and the git plugin? 

If anyone can confirm this, maybe this bug should be changed to RESOLVED UPSTREAM (i.e. a bug with the dropbox installation, or maybe the AUR package)

Operating System: Arch Linux 
KDE Plasma Version: 6.1.90
KDE Frameworks Version: 6.6.0
Qt Version: 6.8.0
Graphics Platform: Wayland
Comment 13 Paul Worrall 2024-09-25 10:13:49 UTC
... unless the Dropbox context menu is provided by KDE?  I just uninstalled Dropbox and it's still there.
Comment 14 Aldo Latino 2024-09-25 16:35:57 UTC
I have Dropbox installed and I correctly view the green checkmarks. For me the bug is resolved.
Comment 15 Paul Worrall 2024-09-25 16:54:40 UTC
(In reply to Aldo Latino from comment #14)
> I have Dropbox installed and I correctly view the green checkmarks. For me
> the bug is resolved.

Sorry, just to be clear: do you also have the Dropbox context menu item enabled in Dolphin?
Comment 16 Aldo Latino 2024-09-25 17:09:09 UTC
Wow, Paul, the Dropbox plugin for Dolphin was disabled! I don't know why... Anyway, I enabled it and the checkmarks are not visible anymore in a Git-controlled folder. If I disable the Dropbox plugin, the checkmarks return. So there must be a conflict between the two plugins (Dropbox and Git).
Comment 17 Paul Worrall 2024-09-25 21:28:05 UTC
To summarise:

1.  If both the Dropbox and Git plugins are enabled in Dolphin and I navigate to my Home folder where the Dropbox folder is located, the green tick emblem is shown on that folder to indicate it is synchronised. Thereafter, navigating to any other folder with a git repository, no emblems are shown by the git plugin and no git context menus are shown.

2. If I disable the Dropbox plugin, then the git plugin works everywhere as expected.

KDE Plasma Version: 6.1.90
KDE Frameworks Version: 6.6.0
Qt Version: 6.8.0
Graphics Platform: Wayland
Comment 18 Aldo Latino 2024-09-26 05:23:10 UTC
I confirm what Paul summarized.
Comment 19 Méven 2025-01-17 17:10:40 UTC
(In reply to Paul Worrall from comment #17)
> To summarise:
> 
> 1.  If both the Dropbox and Git plugins are enabled in Dolphin and I
> navigate to my Home folder where the Dropbox folder is located, the green
> tick emblem is shown on that folder to indicate it is synchronised.
> Thereafter, navigating to any other folder with a git repository, no emblems
> are shown by the git plugin and no git context menus are shown.
> 
> 2. If I disable the Dropbox plugin, then the git plugin works everywhere as
> expected.
> 
> KDE Plasma Version: 6.1.90
> KDE Frameworks Version: 6.6.0
> Qt Version: 6.8.0
> Graphics Platform: Wayland

That's to be expected git and dropbox plugins implement dolphin's KVersionControlPlugin plugin interface.
An assumption was made for the implementation of dolphin, a folder is only in one version control system.
Not a very strong one, I would think.

The question would be what to do then ?
My short answer would be to have dolphin signal to the user the issue and turn off one of the plugins for the folders concerned.
I consider this not a high-priority.
Comment 20 Paul Worrall 2025-01-17 23:24:04 UTC
(In reply to Méven from comment #19)
> An assumption was made for the implementation of dolphin, a folder is only
> in one version control system.

Would be OK for a folder to be in one version control system if visiting a folder using only Dropbox didn't subsequently kill git functionality in other folders using only git.

Agree it's low priority
Comment 21 Aldo Latino 2025-01-18 05:44:46 UTC
(In reply to Paul Worrall from comment #20)
> Would be OK for a folder to be in one version control system if visiting a
> folder using only Dropbox didn't subsequently kill git functionality in
> other folders using only git.
> 
> Agree it's low priority

+1