Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-gui: Makes chooser set 'gitdir' to the resolved path
author
Remi Rampin
<remirampin@gmail.com>
Fri, 6 Mar 2015 16:21:53 +0000
(11:21 -0500)
committer
Pat Thoyts
<patthoyts@users.sourceforge.net>
Sat, 7 Mar 2015 12:29:03 +0000
(12:29 +0000)
If _is_git follows a "gitdir: ..." file link to get to the actual
repository, we want _gitdir to be set to that final path.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Remi Rampin <remirampin@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
lib/choose_repository.tcl
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
cc6825e
)
diff --git
a/lib/choose_repository.tcl
b/lib/choose_repository.tcl
index abc6b1dbcbc62de454fc9f08af8d56d083dc0727..75d1da8d31c31db298aea078db863735b6d45439 100644
(file)
--- a/
lib/choose_repository.tcl
+++ b/
lib/choose_repository.tcl
@@
-338,7
+338,10
@@
method _git_init {} {
return 1
}
return 1
}
-proc _is_git {path} {
+proc _is_git {path {outdir_var ""}} {
+ if {$outdir_var ne ""} {
+ upvar 1 $outdir_var outdir
+ }
if {[file isfile $path]} {
set fp [open $path r]
gets $fp line
if {[file isfile $path]} {
set fp [open $path r]
gets $fp line
@@
-352,12
+355,14
@@
proc _is_git {path} {
if {[file exists [file join $path HEAD]]
&& [file exists [file join $path objects]]
&& [file exists [file join $path config]]} {
if {[file exists [file join $path HEAD]]
&& [file exists [file join $path objects]]
&& [file exists [file join $path config]]} {
+ set outdir $path
return 1
}
if {[is_Cygwin]} {
if {[file exists [file join $path HEAD]]
&& [file exists [file join $path objects.lnk]]
&& [file exists [file join $path config.lnk]]} {
return 1
}
if {[is_Cygwin]} {
if {[file exists [file join $path HEAD]]
&& [file exists [file join $path objects.lnk]]
&& [file exists [file join $path config.lnk]]} {
+ set outdir $path
return 1
}
}
return 1
}
}
@@
-1103,7
+1108,7
@@
method _open_local_path {} {
}
method _do_open2 {} {
}
method _do_open2 {} {
- if {![_is_git [file join $local_path .git]]} {
+ if {![_is_git [file join $local_path .git]
actualgit
]} {
error_popup [mc "Not a Git repository: %s" [file tail $local_path]]
return
}
error_popup [mc "Not a Git repository: %s" [file tail $local_path]]
return
}
@@
-1116,7
+1121,7
@@
method _do_open2 {} {
}
_append_recentrepos [pwd]
}
_append_recentrepos [pwd]
- set ::_gitdir
.
git
+ set ::_gitdir
$actual
git
set ::_prefix {}
set done 1
}
set ::_prefix {}
set done 1
}