-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* git://repo.or.cz/git-gui: (27 commits) git-gui: Update German translation. git-gui: Do not munge conflict marker lines in a normal diff git-gui: Add a simple implementation of SSH_ASKPASS. git-gui: Add a dialog that shows the OpenSSH public key. git-gui: Mark-up strings in show_{other,unmerged}_diff() for localization git-gui: Show a round number of bytes of large untracked text files git-gui: Fix the blame viewer destroy handler. git-gui: Add a search command to the blame viewer. git-gui: Fix the blame window shape. git-gui: Fix switch statement in lib/merge.tcl git-gui: Fix fetching from remotes when adding them git-gui: Fix removing non-pushable remotes git-gui: Make input boxes in init/clone/open dialogs consistent git-gui: Avoid using the term URL when specifying repositories git-gui: gui.autoexplore makes explorer to pop up automatically after picking git-gui: Add Explore Working Copy to the Repository menu git-gui: Use git web--browser for web browsing git-gui: mkdir -p when initializing new remote repository git-gui: Add support for removing remotes git-gui: Add support for adding remotes ...
- Loading branch information
Showing
17 changed files
with
1,080 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/bin/sh | ||
# Tcl ignores the next line -*- tcl -*- \ | ||
exec wish "$0" -- "$@" | ||
|
||
# This is a trivial implementation of an SSH_ASKPASS handler. | ||
# Git-gui uses this script if none are already configured. | ||
|
||
set answer {} | ||
set yesno 0 | ||
set rc 255 | ||
|
||
if {$argc < 1} { | ||
set prompt "Enter your OpenSSH passphrase:" | ||
} else { | ||
set prompt [join $argv " "] | ||
if {[regexp -nocase {\(yes\/no\)\?\s*$} $prompt]} { | ||
set yesno 1 | ||
} | ||
} | ||
|
||
message .m -text $prompt -justify center -aspect 4000 | ||
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 | ||
|
||
if {!$yesno} { | ||
.e configure -show "*" | ||
} | ||
|
||
frame .b | ||
button .b.ok -text OK -command finish | ||
button .b.cancel -text Cancel -command {destroy .} | ||
|
||
pack .b.ok -side left -expand 1 | ||
pack .b.cancel -side right -expand 1 | ||
pack .b -side bottom -fill x -padx 10 -pady 10 | ||
|
||
bind . <Visibility> {focus -force .e} | ||
bind . <Key-Return> finish | ||
bind . <Key-Escape> {destroy .} | ||
bind . <Destroy> {exit $rc} | ||
|
||
proc finish {} { | ||
if {$::yesno} { | ||
if {$::answer ne "yes" && $::answer ne "no"} { | ||
tk_messageBox -icon error -title "Error" -type ok \ | ||
-message "Only 'yes' or 'no' input allowed." | ||
return | ||
} | ||
} | ||
|
||
set ::rc 0 | ||
puts $::answer | ||
destroy . | ||
} | ||
|
||
wm title . "OpenSSH" | ||
tk::PlaceWindow . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.