summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2a9edd0)
raw | patch | inline | side by side (parent: 2a9edd0)
author | Pat Thoyts <patthoyts@users.sourceforge.net> | |
Sat, 10 Jul 2010 22:40:59 +0000 (23:40 +0100) | ||
committer | Pat Thoyts <patthoyts@users.sourceforge.net> | |
Sat, 10 Jul 2010 22:40:59 +0000 (23:40 +0100) |
Commit 21985a11 'git-gui: handle non-standard worktree locations' attempts
to use either GIT_WORK_TREE or core.worktree to set the _gitworktree
variable but these may not be set which leads to a failure to launch
gitk to review history. Use _gitdir to set the location for a standard
git layout where the parent of the .git directory is the working tree.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
to use either GIT_WORK_TREE or core.worktree to set the _gitworktree
variable but these may not be set which leads to a failure to launch
gitk to review history. Use _gitdir to set the location for a standard
git layout where the parent of the .git directory is the working tree.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui.sh | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index 8996d2d6bc9ec9d2fe0f105a18c288d87734f7d3..ec81b15595737915bcebf2a1d4ff0c5ffd1b28c4 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
# try to set work tree from environment, falling back to core.worktree
if {[catch { set _gitworktree $env(GIT_WORK_TREE) }]} {
set _gitworktree [get_config core.worktree]
+ if {$_gitworktree eq ""} {
+ set _gitworktree [file dirname [file normalize $_gitdir]]
+ }
}
if {$_prefix ne {}} {
if {$_gitworktree eq {}} {