summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Pratyush Yadav <me@yadavpratyush.com>2020-12-02 01:09:01 +0530
committerLibravatar Pratyush Yadav <me@yadavpratyush.com>2020-12-02 01:09:01 +0530
commit3e5c911288f559d6b3d4e2e13a44ebd91e5b0b9a (patch)
tree823c764a0155834897583ba66edd11688ee8ddc5
parentMerge branch 'dr/russian-translation' (diff)
parentgit-gui: ssh-askpass: add a checkbox to show the input text (diff)
downloadtgif-3e5c911288f559d6b3d4e2e13a44ebd91e5b0b9a.tar.xz
Merge branch 'da/askpass-mask-checkbox'
Add a checkbox in the SSH askpass helper to optionally show the input text which is often a password. * da/askpass-mask-checkbox: git-gui: ssh-askpass: add a checkbox to show the input text
-rwxr-xr-xgit-gui--askpass15
1 files changed, 14 insertions, 1 deletions
diff --git a/git-gui--askpass b/git-gui--askpass
index 1c99ee8ca2..71a536d232 100755
--- a/git-gui--askpass
+++ b/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