New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Reset unstaged files" with "deleted added files" should not delete ignored files by default #5849
Comments
I do not expect this command to have changed since 2.51 Yes, git-clean -x is what is intended. Make the caption should be changed to "Also delete untracked files and directories". |
Untracked != ignored.
Ignored includes things like build artifacts, logs, and packages, which are typically added to the gitignore file. Deleting those is not a common act. Deleting untracked files IS common, though.
|
So, now i know, who delete all my local configs Good job =_= |
Suggest text is changed to "Also delete ignored and untracked files and directories" |
We can do better. Create a dialog with check boxes for each option. Allow
the user to choose to delete which ones. Could even have a list of files
that will be affected when it is reset all changes/reset all unstaged vs
reset menu on selected files.
…On Thu, Dec 27, 2018, 8:16 AM Gerhard Olsson ***@***.***> wrote:
Suggest text is changed to "Also delete ignored and untracked files and
directories"
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#5849 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADdhsRlvdDKTdpYfhDKso24alrSBAqf4ks5u9MgagaJpZM4ZBfqM>
.
|
What Jay writes is what I thought at first, but changed my mind.
First principle: No files should be deleted without the user first having opportunity to review them. Indeed, this is true of all permanent changes, not just deletions.
Proposal: The feature should only permit deleting files visible in the staging UI. It is already possible to change the view to display ignored files. ONLY if the user has done so should the message box offer to delete ignored files.
By default, it should only offer to delete untracked files.
Supporting observations:
1 - Deleting ignored files is a much lower frequency scenario (a claim based on intuition, not data), so there is no need to make it as easy to delete ignored files as it should be to delete untracked ones.
2 - File deletion is permanent. If this property is coupled with hidden behavior, it becomes an easy opportunity to shoot one’s self in the foot.
________________________________
From: Jay Asbury <notifications@github.com>
Sent: Thursday, December 27, 2018 5:32:15 AM
To: gitextensions/gitextensions
Cc: John Doggett; Author
Subject: Re: [gitextensions/gitextensions] "Reset unstaged files" with "deleted added files" should not delete ignored files by default (#5849)
We can do better. Create a dialog with check boxes for each option. Allow
the user to chose to delete which ones. Could even have a list of files
that will be affected when it is resset all changes/reset all unstaged vs
reset menu on selected files.
On Thu, Dec 27, 2018, 8:16 AM Gerhard Olsson ***@***.***> wrote:
Suggest text is changed to "Also delete ignored and untracked files and
directories"
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#5849 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADdhsRlvdDKTdpYfhDKso24alrSBAqf4ks5u9MgagaJpZM4ZBfqM>
.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgitextensions%2Fgitextensions%2Fissues%2F5849%23issuecomment-450151263&data=02%7C01%7Cjohndog%40microsoft.com%7C65064c8548d84b88717a08d66bffb7c8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636815143376181732&sdata=ks1ia51H79ATdylsRigqbeWxGiJzhXgmXso5n3%2BV54Q%3D&reserved=0>, or mute the thread<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAVL0lAFG7V20fy8CfkuBvAL7aAJi2g12ks5u9MvfgaJpZM4ZBfqM&data=02%7C01%7Cjohndog%40microsoft.com%7C65064c8548d84b88717a08d66bffb7c8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636815143376191736&sdata=RAPNgM5%2FuzXq5I5Zp%2FxRymkO43COeaP6x4UmCbzDuNY%3D&reserved=0>.
|
git clean options. What we need is to run 2 cases:
Always include -f in clean arguments. We update the list when user changes checkboxes. |
The intention with this command was likely to only delete the not ignored files, this is why this option is grayed out if there are no untracked (not ignored files). The arguments are slightly conflicting. I will submit a PR to only delete non ignored files. A second step would be to add a second checkbox for ignored files too. |
None does make sense. It would just be a git reset and no clean. |
Related: #5937 |
Regression in 3.0, from c9b4e25 |
Is there a pointer somewhere to current builds of head of master ? |
Probably a bug. Other issues like #2204 suggest that ignored files were only deleted if the filter was changed to include them.
What is the current behavior?
Result: "git reset -f -d -x" is run, with -x indicating that ignored files should be deleted.
Expect: Don't include -x by default.
Environment:
Did this work in previous version of GitExtensions (which)?
I believe we see the expected behavior in the release build of GitExtensions, this is the first RC build I've tried and the first time I've observed the behavior.
The text was updated successfully, but these errors were encountered: