Skip to content

Commit 49aefb0

Browse files
committed
commitmsg: disable the "amend" action when merging
Make the amend action sensiive to in-progress merges. The action is now disabled to prevent users from seeing the "do not amend while merging" message. Signed-off-by: David Aguilar <davvid@gmail.com>
1 parent ad19d8a commit 49aefb0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cola/widgets/commitmsg.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,10 @@ def setFont(self, font):
329329
self.description.setFont(font)
330330

331331
def set_mode(self, mode):
332+
can_amend = not self.model.is_merging
332333
checked = (mode == self.model.mode_amend)
333334
blocksignals = self.amend_action.blockSignals(True)
335+
self.amend_action.setEnabled(can_amend)
334336
self.amend_action.setChecked(checked)
335337
self.amend_action.blockSignals(blocksignals)
336338

0 commit comments

Comments
 (0)