git-gui: Honor rerere.enabled configuration option
[gitweb.git] / lib / shortcut.tcl
index ebf72e44521feac5619842227f61e4e5f26a819a..a0a1b7dddd0eab743fac896316d3410848b703a2 100644 (file)
@@ -9,6 +9,9 @@ proc do_windows_shortcut {} {
                -title "[appname] ([reponame]): Create Desktop Icon" \
                -initialfile "Git [reponame].bat"]
        if {$fn != {}} {
+               if {[file extension $fn] ne {.bat}} {
+                       set fn ${fn}.bat
+               }
                if {[catch {
                                set fd [open $fn w]
                                puts $fd "@ECHO Entering [reponame]"
@@ -42,6 +45,9 @@ proc do_cygwin_shortcut {} {
                -initialdir $desktop \
                -initialfile "Git [reponame].bat"]
        if {$fn != {}} {
+               if {[file extension $fn] ne {.bat}} {
+                       set fn ${fn}.bat
+               }
                if {[catch {
                                set fd [open $fn w]
                                set sh [exec cygpath \