diff options
Diffstat (limited to 'lib/choose_repository.tcl')
-rw-r--r-- | lib/choose_repository.tcl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/choose_repository.tcl b/lib/choose_repository.tcl index 92d602221f..abc6b1dbcb 100644 --- a/lib/choose_repository.tcl +++ b/lib/choose_repository.tcl @@ -339,6 +339,16 @@ method _git_init {} { } proc _is_git {path} { + if {[file isfile $path]} { + set fp [open $path r] + gets $fp line + close $fp + if {[regexp "^gitdir: (.+)$" $line line link_target]} { + set path [file join [file dirname $path] $link_target] + set path [file normalize $path] + } + } + if {[file exists [file join $path HEAD]] && [file exists [file join $path objects]] && [file exists [file join $path config]]} { |