summaryrefslogtreecommitdiff
path: root/git-gui/git-gui--askpass
diff options
context:
space:
mode:
Diffstat (limited to 'git-gui/git-gui--askpass')
-rwxr-xr-xgit-gui/git-gui--askpass20
1 files changed, 19 insertions, 1 deletions
diff --git a/git-gui/git-gui--askpass b/git-gui/git-gui--askpass
index 4277f30..71a536d 100755
--- a/git-gui/git-gui--askpass
+++ b/git-gui/git-gui--askpass
@@ -26,8 +26,21 @@ pack .m -side top -fill x -padx 20 -pady 20 -expand 1
entry .e -textvariable answer -width 50
pack .e -side top -fill x -padx 10 -pady 10
+proc on_show_input_changed {args} {
+ global show_input
+ if {$show_input} {
+ .e configure -show ""
+ } else {
+ .e configure -show "*"
+ }
+}
+trace add variable show_input write "on_show_input_changed"
+
+set show_input 0
+
if {!$yesno} {
- .e configure -show "*"
+ checkbutton .cb_show -text "Show input" -variable show_input
+ pack .cb_show -side top -anchor nw
}
frame .b
@@ -56,6 +69,11 @@ proc finish {} {
}
}
+ # On Windows, force the encoding to UTF-8: it is what `git.exe` expects
+ if {$::tcl_platform(platform) eq {windows}} {
+ set ::answer [encoding convertto utf-8 $::answer]
+ }
+
puts $::answer
set ::rc 0
}