Staging view: update author/committer on config changes
commitf25e7c92b13fc6517da3d78315489a19b57328d7
authorThomas Wolf <thomas.wolf@paranor.ch>
Mon, 11 Jun 2018 11:40:15 +0000 (11 13:40 +0200)
committerThomas Wolf <thomas.wolf@paranor.ch>
Thu, 5 Jul 2018 16:56:51 +0000 (5 12:56 -0400)
treebb82831da55c13368dc794b77bb505914e4393e0
parenta8f3b251792dc203433db89300c744c55c8ab4b0
Staging view: update author/committer on config changes

When the config changes, update the committer (and possibly also a
signed-off line in the commit message) to the possibly new user.name
and user.email values.

If the author is the same as the committer, also update the author of
the commit.

Correct the logic in CommitMessageComponent for updating the sign-off
settings. Previously, editing the committer field would switch off
the "sign off" flag if the committer was invalid (quite common if you
type a new value), and thus the user had to re-enable it manually and
correct an old or wrong signed-off-by line explicitly.

Bug: 533019
Change-Id: I13252da7beec6cd1ecd1ad2831b4d85c94d46636
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/StagingViewTester.java
org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/stagview/StagingViewTest.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitMessageComponent.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java