Don't allow to undo reword twice

Makes little sense, but can lead to issues (e.g. when trying to unstash
local changes twice).
This commit is contained in:
Kirill Likhodedov
2017-05-29 17:11:00 +03:00
parent b1616cf60e
commit d21b642f07
@@ -72,6 +72,7 @@ class GitRewordOperation(private val repository: GitRepository,
val notification = STANDARD_NOTIFICATION.createNotification("Reworded Successfully", "", NotificationType.INFORMATION, null)
notification.addAction(object : NotificationAction("Undo") {
override fun actionPerformed(e: AnActionEvent, notification: Notification) {
notification.expire()
val specForUndo = spec.cloneWithNewStatuses(mapOf(repository to GitRebaseStatus(SUCCESS, emptyList())))
undo(project, specForUndo)
}