Skip to content

Commit 3748b03

Browse files
Oblomovspearce
authored andcommitted
git-gui: update shortcut tools to use _gitworktree
Signed-off-by: Giuseppe Bilotta <[email protected]> Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent 29e5573 commit 3748b03

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/shortcut.tcl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright (C) 2006, 2007 Shawn Pearce
33

44
proc do_windows_shortcut {} {
5+
global _gitworktree
56
set fn [tk_getSaveFile \
67
-parent . \
78
-title [append "[appname] ([reponame]): " [mc "Create Desktop Icon"]] \
@@ -15,15 +16,15 @@ proc do_windows_shortcut {} {
1516
[info nameofexecutable] \
1617
[file normalize $::argv0] \
1718
] \
18-
[file dirname [file normalize [gitdir]]]
19+
[file normalize [$_gitworktree]]
1920
} err]} {
2021
error_popup [strcat [mc "Cannot write shortcut:"] "\n\n$err"]
2122
}
2223
}
2324
}
2425

2526
proc do_cygwin_shortcut {} {
26-
global argv0
27+
global argv0 _gitworktree
2728

2829
if {[catch {
2930
set desktop [exec cygpath \
@@ -56,7 +57,7 @@ proc do_cygwin_shortcut {} {
5657
$sh -c \
5758
"CHERE_INVOKING=1 source /etc/profile;[sq $me] &" \
5859
] \
59-
[file dirname [file normalize [gitdir]]]
60+
[file normalize [$_gitworktree]]
6061
} err]} {
6162
error_popup [strcat [mc "Cannot write shortcut:"] "\n\n$err"]
6263
}

0 commit comments

Comments
 (0)