DESCRIPTION

[stagingView] Fix amend message being counted as "user-entered"

When clicking amend and then switching to another branch, the amend
state and commit message would stay the same.

This change fixes it so that after switching to another branch, amend
and commit message are reset. I think this is less surprising than
keeping amend but updating the message.

The other hunk in this change is so that we still preserve the amend
state when switching to another repository and back.

Bug: 441607
Change-Id: I7af1bccde43ccd2048dae6643040170ee4b58c51
Signed-off-by: Danika Greer xxx@xxx.xxx


COMMENTS

author: Danika Greer
date: 2014-08-13 13:08:26.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2014-08-13 13:08:32.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/6211/

-------------------------------------
author: Brenden Conley
date: 2014-08-13 13:25:47.000000000

Patch Set 1: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/egit/job/egit.gerrit/6211/ : UNSTABLE

-------------------------------------
author: Brenden Conley
date: 2014-08-13 13:58:37.000000000

Patch Set 1: -Code-Review

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/6212/

-------------------------------------
author: Brenden Conley
date: 2014-08-13 14:22:09.000000000

Patch Set 1: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/egit/job/egit.gerrit/6212/ : UNSTABLE

-------------------------------------
author: Brenden Conley
date: 2014-08-13 15:00:15.000000000

Patch Set 1: -Code-Review

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/6215/

-------------------------------------
author: Brenden Conley
date: 2014-08-13 15:19:43.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/6215/ : SUCCESS

-------------------------------------
author: Douglas Trujillo
date: 2014-09-01 12:34:16.000000000

Patch Set 1:

looks good though I think we should also reset amend state and commit message when switching to another branch and the amend commit message has been modified by the user before. I don't see a reason to keep the amend state and modified commit message of a commit being amended when switching to another branch since there most likely this commit message is meaningless. We could warn the user when he's switching the branch and has modified the commit message that switching the branch will throw away his modifications for the commit message.

-------------------------------------
author: Danika Greer
date: 2014-09-01 13:20:11.000000000

Patch Set 1:

Ok, agreed that it doesn't make sense to preserve the message in that case.

But I don't like hooking another dialog into the already complicated branch switch logic either. Do you think it would be ok without it?

-------------------------------------
author: Douglas Trujillo
date: 2014-09-01 22:40:44.000000000

Patch Set 1:

yes, I think it's ok to reset without a warning also in this case

-------------------------------------
