DESCRIPTION

Warn when amending a commit already on a remote tracking branch

It sometimes happens that a user amends a commit that is already pushed.
This leads to a rejected push when the user tries to push the next time.
It happens either by accident or when the user doesn't yet know about
how to use amend.

To avoid this, a warning text is now shown when the user presses amend.
It's only shown when the commit to amend is contained in any remote
tracking branch (which means the commit is no longer just local).

In the commit dialog, the warning is shown as a dialog message, the same
way the existing warnings already are.

In the staging view, a label above the commit message editor is shown
when there is a warning. It's not only used for the amend warning, but
also warnings about author and committer text, the same way as in the
commit dialog.

Bug: 379172
Change-Id: If79d3459e9d6db3e1179489ebe3b206e4f5ae6eb
Signed-off-by: Danika Greer xxx@xxx.xxx
Signed-off-by: Douglas Trujillo xxx@xxx.xxx

COMMENTS

author: Douglas Trujillo
date: 2012-05-19 23:51:12.000000000

Uploaded patch set 3.

-------------------------------------
author: Douglas Trujillo
date: 2012-05-19 23:52:32.000000000

Patch Set 3: Verified; Looks good to me, approved; IP review completed

improved warning message

-------------------------------------
author: Douglas Trujillo
date: 2012-05-19 23:52:34.000000000

Change has been successfully merged into the git repository.

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