summaryrefslogtreecommitdiff
path: root/lib/choose_repository.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/choose_repository.tcl')
-rw-r--r--lib/choose_repository.tcl10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/choose_repository.tcl b/lib/choose_repository.tcl
index 92d6022..abc6b1d 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]]} {