Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368441

Summary: warnings about discarding local changes should be more specific
Product: [Technology] EGit Reporter: Stephan Herrmann <stephan.herrmann>
Component: UIAssignee: Project Inbox <egit.ui-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 1.1   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Whiteboard:

Description Stephan Herrmann CLA 2012-01-12 07:13:04 EST
Several actions in EGit give a warning that all local changes will be
discarded. From these dialogs it is not clear *which* changes exactly
will be discarded.

Example: I needed to revert a specific file to an older commit.
I considered two actions:
- select the file, open its history, choose a commit, invoke reset
- select the file, invoke replace with commit, choose a commit
Since I was unsure about the difference I had hoped the dialogs
could tell me, but unfortunately both actions gave very unspecific
warnings that all my changes will be discarded.

I learned the hard way, that in one case "all changes" means that 
all uncommitted changes in the workspace will be nuked and the entire
local branch reset to that old commit, whereas the other action did
exactly what I needed: discard the changes of just one file.

You might say I should have known the difference between both commands,
but I think EGit could better help the novice understand the impact
of any destructive actions before they are invoked.

Perhaps this request depends on bug 359126: only after pending changes
have been computed can the dialog give specific messages like:
"changes in file foo.bar will be discarded", "changes in 42 local resources
will be discarded", vs. "all changes in you're entire workspace will be
discarded, including any commits after commitX".