summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-07-04 06:29:32 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-07-04 06:29:32 (GMT)
commitc8e23aaf1814b95d64fc536fdf1acaa54bb28411 (patch)
tree1141d1bd34735f012402765b52d52b0e59aa7e5e /lib
parent7aecb128779ffd8258f01f4382df963900ae6acd (diff)
downloadgit-c8e23aaf1814b95d64fc536fdf1acaa54bb28411.zip
git-c8e23aaf1814b95d64fc536fdf1acaa54bb28411.tar.gz
git-c8e23aaf1814b95d64fc536fdf1acaa54bb28411.tar.bz2
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/merge.tcl4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/merge.tcl b/lib/merge.tcl
index ae0389d..889182f 100644
--- a/lib/merge.tcl
+++ b/lib/merge.tcl
@@ -213,7 +213,9 @@ proc dialog {} {
pack $w.buttons.visualize -side left
button $w.buttons.create -text Merge -command $_start
pack $w.buttons.create -side right
- button $w.buttons.cancel -text {Cancel} -command [list destroy $w]
+ button $w.buttons.cancel \
+ -text {Cancel} \
+ -command "unlock_index;destroy $w"
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10