Skip to content

Commit e3efff4

Browse files
carenasj6t
authored andcommitted
git-gui: ensure own version of git-gui--askpass is used
When finding a location for the askpass helper, git will be asked for its exec path, but if that git is not the same that called git-gui then we might mistakenly point to its helper instead. Assume that git-gui and the helper are colocated to derive its path instead. This is specially useful in macOS where a broken version of that helper is provided by the system git. [j6t: move directory to variable to help in-flight topics] Suggested-by: Mark Levedahl <[email protected]> Signed-off-by: Carlo Marcelo Arenas Belón <[email protected]> Signed-off-by: Johannes Sixt <[email protected]>
1 parent 0e3233b commit e3efff4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

git-gui.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1113,9 +1113,11 @@ citool {
11131113
## execution environment
11141114

11151115
# Suggest our implementation of askpass, if none is set
1116+
set argv0dir [file dirname [file normalize $::argv0]]
11161117
if {![info exists env(SSH_ASKPASS)]} {
1117-
set env(SSH_ASKPASS) [file join [git --exec-path] git-gui--askpass]
1118+
set env(SSH_ASKPASS) [file join $argv0dir git-gui--askpass]
11181119
}
1120+
unset argv0dir
11191121

11201122
######################################################################
11211123
##

0 commit comments

Comments
 (0)