git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] git-gui: ssh-askpass: add a checkbox to show the input text
@ 2020-11-07 22:20 David Aguilar
  2020-12-01 19:41 ` Pratyush Yadav
  0 siblings, 1 reply; 2+ messages in thread
From: David Aguilar @ 2020-11-07 22:20 UTC (permalink / raw)
  To: Pratyush Yadav
  Cc: Miguel Boekhold, Efimov Vasily, Pat Thoyts, Junio C Hamano, git

Hide the input text by default since the field is
commonly used for sensative informations such as passwords.

Add a "Show input" checkbox to conditionally show the input.

Helped-by: Miguel Boekhold <miguel.boekhold@osudio.com>
Signed-off-by: Efimov Vasily <laer.18@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
---
 git-gui--askpass | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

This patch gathers the submissions from the following sources:

https://github.com/patthoyts/git-gui/issues/22
https://github.com/prati0100/git-gui/pull/38
https://github.com/git-cola/git-cola/issues/1004
https://github.com/git-cola/git-cola/pull/1069

diff --git a/git-gui--askpass b/git-gui--askpass
index 1c99ee8..71a536d 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
-- 
2.29.2.154.g7f7ebe054a


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] git-gui: ssh-askpass: add a checkbox to show the input text
  2020-11-07 22:20 [PATCH] git-gui: ssh-askpass: add a checkbox to show the input text David Aguilar
@ 2020-12-01 19:41 ` Pratyush Yadav
  0 siblings, 0 replies; 2+ messages in thread
From: Pratyush Yadav @ 2020-12-01 19:41 UTC (permalink / raw)
  To: David Aguilar
  Cc: Miguel Boekhold, Efimov Vasily, Pat Thoyts, Junio C Hamano, git

On 07/11/20 02:20PM, David Aguilar wrote:
> Hide the input text by default since the field is
> commonly used for sensative informations such as passwords.
> 
> Add a "Show input" checkbox to conditionally show the input.
> 
> Helped-by: Miguel Boekhold <miguel.boekhold@osudio.com>
> Signed-off-by: Efimov Vasily <laer.18@gmail.com>
> Signed-off-by: David Aguilar <davvid@gmail.com>

Merged to git-gui/master. Thanks.

-- 
Regards,
Pratyush Yadav

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-01 19:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-07 22:20 [PATCH] git-gui: ssh-askpass: add a checkbox to show the input text David Aguilar
2020-12-01 19:41 ` Pratyush Yadav

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).