@@ -84,14 +84,7 @@ proc _which {what args} {
84
84
global env _search_exe _search_path
85
85
86
86
if {$_search_path eq {}} {
87
- if {[is_Cygwin] && [regexp {^(/|\.:)} $env(PATH) ]} {
88
- set _search_path [split [exec cygpath \
89
- --windows \
90
- --path \
91
- --absolute \
92
- $env(PATH) ] {;}]
93
- set _search_exe .exe
94
- } elseif {[is_Windows]} {
87
+ if {[is_Windows]} {
95
88
set gitguidir [file dirname [info script]]
96
89
regsub -all ";" $gitguidir "\\ ;" gitguidir
97
90
set env(PATH) " $gitguidir ;$env(PATH) "
@@ -342,14 +335,7 @@ proc gitexec {args} {
342
335
if {[ catch {set _gitexec [git --exec-path] } err]} {
343
336
error " Git not installed?\n\n $err "
344
337
}
345
- if {[ is_Cygwin] } {
346
- set _gitexec [ exec cygpath \
347
- --windows \
348
- --absolute \
349
- $_gitexec ]
350
- } else {
351
- set _gitexec [ file normalize $_gitexec ]
352
- }
338
+ set _gitexec [ file normalize $_gitexec ]
353
339
}
354
340
if {$args eq {}} {
355
341
return $_gitexec
@@ -364,14 +350,7 @@ proc githtmldir {args} {
364
350
# Git not installed or option not yet supported
365
351
return {}
366
352
}
367
- if {[ is_Cygwin] } {
368
- set _githtmldir [ exec cygpath \
369
- --windows \
370
- --absolute \
371
- $_githtmldir ]
372
- } else {
373
- set _githtmldir [ file normalize $_githtmldir ]
374
- }
353
+ set _githtmldir [ file normalize $_githtmldir ]
375
354
}
376
355
if {$args eq {}} {
377
356
return $_githtmldir
@@ -1318,9 +1297,6 @@ if {$_gitdir eq "."} {
1318
1297
set _gitdir [pwd ]
1319
1298
}
1320
1299
1321
- if {![file isdirectory $_gitdir ] && [is_Cygwin]} {
1322
- catch {set _gitdir [exec cygpath --windows $_gitdir ]}
1323
- }
1324
1300
if {![file isdirectory $_gitdir ]} {
1325
1301
catch {wm withdraw .}
1326
1302
error_popup [strcat [mc " Git directory not found:" ] " \n\n $_gitdir " ]
@@ -1332,11 +1308,7 @@ apply_config
1332
1308
1333
1309
# v1.7.0 introduced --show-toplevel to return the canonical work-tree
1334
1310
if {[package vcompare $_git_version 1.7.0] >= 0} {
1335
- if { [is_Cygwin] } {
1336
- catch {set _gitworktree [exec cygpath --windows [git rev-parse --show-toplevel]]}
1337
- } else {
1338
- set _gitworktree [git rev-parse --show-toplevel]
1339
- }
1311
+ set _gitworktree [git rev-parse --show-toplevel]
1340
1312
} else {
1341
1313
# try to set work tree from environment, core.worktree or use
1342
1314
# cdup to obtain a relative path to the top of the worktree. If
@@ -1561,24 +1533,8 @@ proc rescan {after {honor_trustmtime 1}} {
1561
1533
}
1562
1534
}
1563
1535
1564
- if {[is_Cygwin]} {
1565
- set is_git_info_exclude {}
1566
- proc have_info_exclude {} {
1567
- global is_git_info_exclude
1568
-
1569
- if {$is_git_info_exclude eq {}} {
1570
- if {[catch {exec test -f [gitdir info exclude]}]} {
1571
- set is_git_info_exclude 0
1572
- } else {
1573
- set is_git_info_exclude 1
1574
- }
1575
- }
1576
- return $is_git_info_exclude
1577
- }
1578
- } else {
1579
- proc have_info_exclude {} {
1580
- return [file readable [gitdir info exclude]]
1581
- }
1536
+ proc have_info_exclude {} {
1537
+ return [file readable [gitdir info exclude]]
1582
1538
}
1583
1539
1584
1540
proc rescan_stage2 {fd after} {
@@ -2318,7 +2274,9 @@ proc do_git_gui {} {
2318
2274
2319
2275
# Get the system-specific explorer app/command.
2320
2276
proc get_explorer {} {
2321
- if {[is_Cygwin] || [is_Windows]} {
2277
+ if {[is_Cygwin]} {
2278
+ set explorer " /bin/cygstart.exe --explore"
2279
+ } elseif {[is_Windows]} {
2322
2280
set explorer " explorer.exe"
2323
2281
} elseif {[is_MacOSX]} {
2324
2282
set explorer " open"
@@ -3112,10 +3070,6 @@ if {[is_MacOSX]} {
3112
3070
set doc_path [githtmldir]
3113
3071
if {$doc_path ne {}} {
3114
3072
set doc_path [file join $doc_path index.html]
3115
-
3116
- if {[is_Cygwin]} {
3117
- set doc_path [exec cygpath --mixed $doc_path ]
3118
- }
3119
3073
}
3120
3074
3121
3075
if {[file isfile $doc_path ]} {
@@ -4087,60 +4041,6 @@ set file_lists($ui_workdir) [list]
4087
4041
wm title . " [ appname] ([ reponame] ) [ file normalize $_gitworktree ] "
4088
4042
focus -force $ui_comm
4089
4043
4090
- # -- Warn the user about environmental problems. Cygwin's Tcl
4091
- # does *not* pass its env array onto any processes it spawns.
4092
- # This means that git processes get none of our environment.
4093
- #
4094
- if {[is_Cygwin]} {
4095
- set ignored_env 0
4096
- set suggest_user {}
4097
- set msg [mc " Possible environment issues exist.
4098
-
4099
- The following environment variables are probably
4100
- going to be ignored by any Git subprocess run
4101
- by %s:
4102
-
4103
- " [appname]]
4104
- foreach name [array names env] {
4105
- switch -regexp -- $name {
4106
- {^GIT_INDEX_FILE$} -
4107
- {^GIT_OBJECT_DIRECTORY$} -
4108
- {^GIT_ALTERNATE_OBJECT_DIRECTORIES$} -
4109
- {^GIT_DIFF_OPTS$} -
4110
- {^GIT_EXTERNAL_DIFF$} -
4111
- {^GIT_PAGER$} -
4112
- {^GIT_TRACE$} -
4113
- {^GIT_CONFIG$} -
4114
- {^GIT_(AUTHOR|COMMITTER)_DATE$} {
4115
- append msg " - $name \n "
4116
- incr ignored_env
4117
- }
4118
- {^GIT_(AUTHOR|COMMITTER)_(NAME|EMAIL)$} {
4119
- append msg " - $name \n "
4120
- incr ignored_env
4121
- set suggest_user $name
4122
- }
4123
- }
4124
- }
4125
- if {$ignored_env > 0} {
4126
- append msg [mc "
4127
- This is due to a known issue with the
4128
- Tcl binary distributed by Cygwin." ]
4129
-
4130
- if {$suggest_user ne {}} {
4131
- append msg [mc "
4132
-
4133
- A good replacement for %s
4134
- is placing values for the user.name and
4135
- user.email settings into your personal
4136
- ~/.gitconfig file.
4137
- " $suggest_user ]
4138
- }
4139
- warn_popup $msg
4140
- }
4141
- unset ignored_env msg suggest_user name
4142
- }
4143
-
4144
4044
# -- Only initialize complex UI if we are going to stay running.
4145
4045
#
4146
4046
if {[is_enabled transport]} {
0 commit comments