From d21b642f07ec794734c004d0c65a8d7840970c30 Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Fri, 26 May 2017 17:46:00 +0300 Subject: [PATCH] Don't allow to undo reword twice Makes little sense, but can lead to issues (e.g. when trying to unstash local changes twice). --- plugins/git4idea/src/git4idea/rebase/GitRewordOperation.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/git4idea/src/git4idea/rebase/GitRewordOperation.kt b/plugins/git4idea/src/git4idea/rebase/GitRewordOperation.kt index 0c8d2e07d386..a9f34eed633c 100644 --- a/plugins/git4idea/src/git4idea/rebase/GitRewordOperation.kt +++ b/plugins/git4idea/src/git4idea/rebase/GitRewordOperation.kt @@ -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) }