Improve check for uncommitted changes before cherry-pick
commit786db92bd4f6b6d01ff8b2b17b1967923b0810e1
authorThomas Wolf <thomas.wolf@paranor.ch>
Tue, 3 Apr 2018 11:27:27 +0000 (3 13:27 +0200)
committerThomas Wolf <thomas.wolf@paranor.ch>
Sat, 12 May 2018 21:56:30 +0000 (12 23:56 +0200)
tree2b1a962de332f206c7b9163cb6874613ead3865c
parenta0840d3207f922189e6baf7abc03606fe1f5e9c4
Improve check for uncommitted changes before cherry-pick

First, give the dialog an appropriate title. The default title
mentions rebasing, which is confusing when the user tries to
cherry-pick.

Second, change the logic for applying a cherry-pick. Don't try to
figure out up front whether there will be conflicts with uncommitted
changes. Instead, just do it, and if the operation failed because of
a dirty working tree or index, then ask the user to clean-up, and if
so redo the operation.

The behavior is then more in line with rebasing or checking out,
which also can succeed if the working tree is dirty.

Bug: 470452
Change-Id: I0ea3985ecebb8383f45f560e94f3cde1309d2570
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIRepositoryUtils.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/command/CherryPickHandler.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties