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

Bug 364022

Summary: Staging view discards commit message when accidentally hitting "Amend previous commit"
Product: [Technology] EGit Reporter: Jan Sievers <jan.sievers>
Component: UIAssignee: Robin Stocker <robin>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, jens.baumgart, lukas.eder, remy.suen, robin, sam.davis, t-oberlies, tomasz.zarna
Version: 1.1   
Target Milestone: 2.2-M1   
Hardware: All   
OS: All   
Whiteboard:

Description Jan Sievers CLA 2011-11-17 07:39:16 EST
steps to reproduce:

1. open staging view
2. start typing a commit message
3. (accidentally) hit the "amend" button
4. toggle the amend button to undo amend

Expected behaviour:

original commit message is restored.

Observed behaviour:

original commit message is lost.
Comment 1 Remy Suen CLA 2011-11-18 10:29:17 EST
Same thing happens for the commit dialog.
Comment 2 Jens Baumgart CLA 2011-12-01 11:06:41 EST
I think the user should be sent a confirmation dialog if he presses amend and the text editor is not empty.
Comment 3 Tobias Oberlies CLA 2012-08-30 09:36:21 EDT
Changed title so that I would have been able to find it with google.

P.S.: Me too! ;-)
Comment 4 Tobias Oberlies CLA 2012-10-15 10:24:27 EDT
*** Bug 389775 has been marked as a duplicate of this bug. ***
Comment 5 Robin Stocker CLA 2012-11-06 16:38:20 EST
Fix which applies to staging view and commit dialog pushed to review:

https://git.eclipse.org/r/8547

It doesn't use a warning dialog, instead it just restores the old message when deselecting amend.
Comment 6 Tobias Oberlies CLA 2012-11-09 11:18:36 EST
*** Bug 382719 has been marked as a duplicate of this bug. ***
Comment 7 Jens Baumgart CLA 2012-11-09 11:36:58 EST
Merged as 65969094c1b7d992b2558494c1d1b191003f62eb
Comment 8 Tomasz Zarna CLA 2012-11-12 06:29:47 EST
Verified in 2.2.0.201211112313. Thx Robin!
Comment 9 Robin Stocker CLA 2012-11-12 08:11:37 EST
You're welcome, thanks for testing :). Also added to http://wiki.eclipse.org/EGit/New_and_Noteworthy/2.2#Other_Improvements
Comment 10 Lukas Eder CLA 2016-06-29 05:56:40 EDT
Was just going to create a duplicate of this, great to see it's already addressed, thanks!