Bug 451926 - "Git Remove" should default to "git rm --cached"
Summary: "Git Remove" should default to "git rm --cached"
Status: RESOLVED DUPLICATE of bug 414342
Alias: None
Product: dolphin
Classification: Applications
Component: plugins: git (show other bugs)
Version: 19.12.3
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Dörner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-26 12:11 UTC by kevin
Modified: 2022-03-27 21:47 UTC (History)
3 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 kevin 2022-03-26 12:11:29 UTC
The right-click "Git Add" in this plugin adds the file/folder to the staging area.  It might logically be expected that the accompanying "Git Remove" would remove the file/folder from the staging area (but keep it on-disk in the working folder).  However, it not only removes the file/folder from the staging area BUT ALSO deletes it from the working folder.  Nor is the deleted file/folder available in the wastebin.  It would be safer (and more logical) to have the "Git Remove" option default to "git rm ---cached" instead of "git rm".

This is raising the same issue as https://bugs.kde.org/show_bug.cgi?id=414342, where a fix was proposed: https://phabricator.kde.org/D25431.  However, that fix has been marked as "requires changes to proceed" since 2020, and it looks as if the fix was never applied to the plugin, hence my raising it again.  If using --cached by default causes problems as referred to by David Edmundson, I would suggest a sensible approach in the meantime would be to raise a dialogue box saying "This will nuke your files - do you REALLY want to do this?", with a Yes/No answer.  The git fsck approach suggested by Nate Graham does not work with (eg) pdfs.
Comment 1 galder 2022-03-27 09:27:59 UTC
Hello,
Would not be better if you raise the issue directly 
In the existing ticket?
https://bugs.kde.org/show_bug.cgi?id=414342

Looping Nate

Regards
Comment 2 Nate Graham 2022-03-27 21:47:55 UTC
Yep, that looks like the same thing.

*** This bug has been marked as a duplicate of bug 414342 ***