Skip to content

Commit 3e5c911

Browse files
committed
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
2 parents 8222c75 + a4e1bc9 commit 3e5c911

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

git-gui--askpass

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,21 @@ pack .m -side top -fill x -padx 20 -pady 20 -expand 1
2626
entry .e -textvariable answer -width 50
2727
pack .e -side top -fill x -padx 10 -pady 10
2828

29+
proc on_show_input_changed {args} {
30+
global show_input
31+
if {$show_input} {
32+
.e configure -show ""
33+
} else {
34+
.e configure -show "*"
35+
}
36+
}
37+
trace add variable show_input write "on_show_input_changed"
38+
39+
set show_input 0
40+
2941
if {!$yesno} {
30-
.e configure -show "*"
42+
checkbutton .cb_show -text "Show input" -variable show_input
43+
pack .cb_show -side top -anchor nw
3144
}
3245

3346
frame .b

0 commit comments

Comments
 (0)