File tree Expand file tree Collapse file tree 1 file changed +3
-24
lines changed
Expand file tree Collapse file tree 1 file changed +3
-24
lines changed Original file line number Diff line number Diff line change @@ -357,31 +357,10 @@ proc _is_git {path {outdir_var ""}} {
357357 if {$outdir_var ne " " } {
358358 upvar 1 $outdir_var outdir
359359 }
360- if {[file isfile $path ]} {
361- set fp [open $path r]
362- gets $fp line
363- close $fp
364- if {[regexp "^gitdir: (.+)$" $line line link_target]} {
365- set path [file join [file dirname $path ] $link_target ]
366- set path [file normalize $path ]
367- }
368- }
369-
370- if {[file exists [file join $path HEAD]]
371- && [file exists [file join $path objects]]
372- && [file exists [file join $path config]]} {
373- set outdir $path
374- return 1
375- }
376- if {[is_Cygwin]} {
377- if {[file exists [file join $path HEAD]]
378- && [file exists [file join $path objects.lnk]]
379- && [file exists [file join $path config.lnk]]} {
380- set outdir $path
381- return 1
382- }
360+ if {[catch {set outdir [git rev-parse --resolve-git-dir $path ]}]} {
361+ return 0
383362 }
384- return 0
363+ return 1
385364}
386365
387366proc _objdir {path} {
You can’t perform that action at this time.
0 commit comments