git-gui: Improve the Windows and Mac OS X shortcut creators

We now embed any GIT_* and SSH_* environment variables as well as
the path to the git wrapper executable into the Mac OS X .app file.
This should allow us to restore the environment properly when
we restart.

We also try to use proper Bourne shell single quoting when we can,
as this avoids any sort of problems that might occur due to a path
containing shell metacharacters.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
Shawn O. Pearce
2007-07-09 03:28:41 -04:00
parent 74c4763c76
commit 7eafa2f157
2 changed files with 31 additions and 21 deletions

View File

@ -475,6 +475,11 @@ proc git_write {args} {
return [open [concat $opt $cmdp $args] w]
}
proc sq {value} {
regsub -all ' $value "'\\''" value
return "'$value'"
}
proc load_current_branch {} {
global current_branch is_detached