{"thread":{"id":"22693","subject":"[BUG] git-gui blame: \"Show History Context\" is broken","startedAt":"2010-02-17T12:13:04Z","lastAt":"2010-02-19T13:55:22Z","messageCount":3,"participants":["Kirill Smelkov","Pat Thoyts"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"134863","messageId":"20100217121304.GA1623@tugrik.mns.mnsspb.ru","threadId":"22693","inReplyTo":null,"subject":"[BUG] git-gui blame: \"Show History Context\" is broken","fromName":"Kirill Smelkov","fromEmail":"kirr@mns.spb.ru","sentAt":"2010-02-17T12:13:04Z","receivedAt":"2010-02-17T12:13:04Z","isPatch":false,"sender":{"key":"kirr@navytux.spb.ru","avatar":"https://gravatar.com/avatar/cf3445fdad1849941e17ab25bf1ee7c5ea1be2deb444be25ff5f36b0e50a985f?d=mp&s=160"},"body":"Git-gui as shipped with todays git.git master is a bit broken:\n\nin git.git master (v1.7.0-29-g6d81630), try running:\n\n    $ git gui blame xdiff-interface.h\n\nThen select first line 'd9ea d9ea   1 #ifndef XDIFF_INTERFACE_H', right\nclick to popup context menu, select \"Show History Context\" -->\n\n--> git gui errors with:\n\n    \"Error: couldn't change working directory to \"\": no ...\n\n\nThanks,\nKirill\n"},{"id":"134918","messageId":"87iq9vgugf.fsf@users.sourceforge.net","threadId":"22693","inReplyTo":"20100217121304.GA1623@tugrik.mns.mnsspb.ru","subject":"[PATCH] Handle failure of core.worktree to identify the working directory.","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2010-02-18T02:11:21Z","receivedAt":"2010-02-18T02:11:21Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"Commit 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>\n---\n>Git-gui as shipped with todays git.git master is a bit broken:\n>\n>in git.git master (v1.7.0-29-g6d81630), try running:\n>\n>    $ git gui blame xdiff-interface.h\n>\n>Then select first line 'd9ea d9ea   1 #ifndef XDIFF_INTERFACE_H', right\n>click to popup context menu, select \"Show History Context\" -->\n>\n>--> git gui errors with:\n>\n>    \"Error: couldn't change working directory to \"\": no ...\n>\n>\n>Thanks,\n>Kirill\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.6.5.1.1367.gcd48\n\n\n-- \nPat Thoyts                            http://www.patthoyts.tk/\nPGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD\n"},{"id":"135080","messageId":"20100219135522.GA27417@tugrik.mns.mnsspb.ru","threadId":"22693","inReplyTo":"87iq9vgugf.fsf@users.sourceforge.net","subject":"Re: [PATCH] Handle failure of core.worktree to identify the working directory.","fromName":"Kirill Smelkov","fromEmail":"kirr@mns.spb.ru","sentAt":"2010-02-19T13:55:22Z","receivedAt":"2010-02-19T13:55:22Z","isPatch":true,"sender":{"key":"kirr@navytux.spb.ru","avatar":"https://gravatar.com/avatar/cf3445fdad1849941e17ab25bf1ee7c5ea1be2deb444be25ff5f36b0e50a985f?d=mp&s=160"},"body":"On Thu, Feb 18, 2010 at 02:11:21AM +0000, Pat Thoyts wrote:\n> Commit 21985a11 'git-gui: handle non-standard worktree locations' attempts\n> to use either GIT_WORK_TREE or core.worktree to set the _gitworktree\n> variable but these may not be set which leads to a failure to launch\n> gitk to review history. Use _gitdir to set the location for a standard\n> git layout where the parent of the .git directory is the working tree.\n> \n> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n\nNow it works, thanks.\n\nTested-by: Kirill Smelkov <kirr@mns.spb.ru>\n\n> >Git-gui as shipped with todays git.git master is a bit broken:\n> >\n> >in git.git master (v1.7.0-29-g6d81630), try running:\n> >\n> >    $ git gui blame xdiff-interface.h\n> >\n> >Then select first line 'd9ea d9ea   1 #ifndef XDIFF_INTERFACE_H', right\n> >click to popup context menu, select \"Show History Context\" -->\n> >\n> >--> git gui errors with:\n> >\n> >    \"Error: couldn't change working directory to \"\": no ...\n> >\n> >\n> >Thanks,\n> >Kirill\n> \n>  git-gui.sh |    3 +++\n>  1 files changed, 3 insertions(+), 0 deletions(-)\n> \n> diff --git a/git-gui.sh b/git-gui.sh\n> index 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"}]}