{"thread":{"id":"23853","subject":"[PATCH (regression, resend)] Handle failure of core.worktree to identify the working directory.","startedAt":"2010-05-20T09:57:57Z","lastAt":"2010-05-20T09:57:57Z","messageCount":1,"participants":["Kirill Smelkov"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"141947","messageId":"1274349477-8747-1-git-send-email-kirr@mns.spb.ru","threadId":"23853","inReplyTo":null,"subject":"[PATCH (regression, resend)] Handle failure of core.worktree to identify the working directory.","fromName":"Kirill Smelkov","fromEmail":"kirr@mns.spb.ru","sentAt":"2010-05-20T09:57:57Z","receivedAt":"2010-05-20T09:57:57Z","isPatch":true,"sender":{"key":"kirr@navytux.spb.ru","avatar":"https://gravatar.com/avatar/cf3445fdad1849941e17ab25bf1ee7c5ea1be2deb444be25ff5f36b0e50a985f?d=mp&s=160"},"body":"From: Pat Thoyts <patthoyts@users.sourceforge.net>\n\nCommit 21985a11 'git-gui: handle non-standard worktree locations' attempts\nto use either GIT_WORK_TREE or core.worktree to set the _gitworktree\nvariable but these may not be set which leads to a failure to launch\ngitk to review history. Use _gitdir to set the location for a standard\ngit layout where the parent of the .git directory is the working tree.\n\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\nTested-by: Kirill Smelkov <kirr@mns.spb.ru>\n---\n git-gui.sh |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/git-gui.sh b/git-gui.sh\nindex 8996d2d..ec81b15 100755\n--- a/git-gui.sh\n+++ b/git-gui.sh\n@@ -1158,6 +1158,9 @@ apply_config\n # try to set work tree from environment, falling back to core.worktree\n if {[catch { set _gitworktree $env(GIT_WORK_TREE) }]} {\n \tset _gitworktree [get_config core.worktree]\n+\tif {$_gitworktree eq \"\"} {\n+\t\tset _gitworktree [file dirname [file normalize $_gitdir]]\n+\t}\n }\n if {$_prefix ne {}} {\n \tif {$_gitworktree eq {}} {\n-- \n1.7.1.91.ga63a7\n"}]}