Skip to content

Commit e29c0d1

Browse files
angavrilovspearce
authored andcommitted
git-gui: Add the Show SSH Key item to the clone dialog.
The user might need to see the key before cloning a repository. This patch makes the relevant menu item available in the Select Repository/Clone dialog. Signed-off-by: Alexander Gavrilov <[email protected]> Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent b28ebab commit e29c0d1

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

git-gui.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,17 @@ citool {
997997
}
998998
}
999999
1000+
######################################################################
1001+
##
1002+
## execution environment
1003+
1004+
set have_tk85 [expr {[package vcompare $tk_version "8.5"] >= 0}]
1005+
1006+
# Suggest our implementation of askpass, if none is set
1007+
if {![info exists env(SSH_ASKPASS)]} {
1008+
set env(SSH_ASKPASS) [gitexec git-gui--askpass]
1009+
}
1010+
10001011
######################################################################
10011012
##
10021013
## repository setup
@@ -1073,15 +1084,6 @@ set selected_commit_type new
10731084
set nullid "0000000000000000000000000000000000000000"
10741085
set nullid2 "0000000000000000000000000000000000000001"
10751086
1076-
set have_tk85 [expr {[package vcompare $tk_version "8.5"] >= 0}]
1077-
1078-
######################################################################
1079-
1080-
# Suggest our implementation of askpass, if none is set
1081-
if {![info exists env(SSH_ASKPASS)]} {
1082-
set env(SSH_ASKPASS) [gitexec git-gui--askpass]
1083-
}
1084-
10851087
######################################################################
10861088
##
10871089
## task management

lib/choose_repository.tcl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,18 @@ constructor pick {} {
4343
$w.mbar.apple add command \
4444
-label [mc "About %s" [appname]] \
4545
-command do_about
46+
$w.mbar.apple add command \
47+
-label [mc "Show SSH Key"] \
48+
-command do_ssh_key
4649
} else {
4750
$w.mbar add cascade -label [mc Help] -menu $w.mbar.help
4851
menu $w.mbar.help
4952
$w.mbar.help add command \
5053
-label [mc "About %s" [appname]] \
5154
-command do_about
55+
$w.mbar.help add command \
56+
-label [mc "Show SSH Key"] \
57+
-command do_ssh_key
5258
}
5359

5460
wm protocol $top WM_DELETE_WINDOW exit

0 commit comments

Comments
 (0)