@matheusbsbs / matheus-bagliano / commits / c8e23aaf18
Fork 0

git-gui: Unlock the index when cancelling merge dialog

Pressing the escape key while in the merge dialog cancels the merge and correctly unlocks the index. Unfortunately this is not true of the Cancel button, using it closes the dialog but does not release the index lock, rendering git-gui frozen until you restart it. We now properly release the index lock when the Cancel button is used. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Jul 4, 2007 at 02:29 UTC c8e23aaf1814b95d64fc536fdf1acaa54bb28411
1 file changed +3 -1
lib/merge.tcl
+3 -1
@@ -213,7 +213,9 @@ proc dialog {} {
213 pack $w.buttons.visualize -side left
214 button $w.buttons.create -text Merge -command $_start
215 pack $w.buttons.create -side right
216 - button $w.buttons.cancel -text {Cancel} -command [list destroy $w]
216 + button $w.buttons.cancel \
217 + -text {Cancel} \
218 + -command "unlock_index;destroy $w"
219 pack $w.buttons.cancel -side right -padx 5
220 pack $w.buttons -side bottom -fill x -pady 10 -padx 10
221