[PATCH git-gui] git-gui--askpass: Do not hang on exit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Anders Kaseorg wrote:

> When git-gui--askpass is manually copied from the source into
> /usr/lib/git-core, though, it doesn’t particularly work; its window
> just freezes after the password is typed.

The problem seems to be the

  bind . <Destroy>    {exit $::rc}

line; apparently each exit causes the window to be destroyed again,
resulting in git gui hanging.

Reported-by: Anders Kaseorg <andersk@xxxxxxx>
Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
---

diff --git a/git-gui--askpass b/git-gui--askpass
index 12e117e..1537f75 100755
--- a/git-gui--askpass
+++ b/git-gui--askpass
@@ -39,7 +39,7 @@ pack .b -side bottom -fill x -padx 10 -pady 10
 bind . <Visibility> {focus -force .e}
 bind . <Key-Return> finish
 bind . <Key-Escape> {destroy .}
-bind . <Destroy>    {exit $rc}
+bind . <Destroy>    {exit $::rc}
 
 proc finish {} {
 	if {$::yesno} {
@@ -52,7 +52,9 @@ proc finish {} {
 
 	set ::rc 0
 	puts $::answer
+	bind . <Destroy> {}
 	destroy .
+	exit 0
 }
 
 wm title . "OpenSSH"
-- 
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]