git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kirill Smelkov <kirr@mns.spb.ru>
To: Pat Thoyts <patthoyts@users.sourceforge.net>
Cc: "Shawn O. Pearce" <spearce@spearce.org>, git@vger.kernel.org
Subject: Re: [PATCH] Handle failure of core.worktree to identify the working directory.
Date: Fri, 19 Feb 2010 16:55:22 +0300	[thread overview]
Message-ID: <20100219135522.GA27417@tugrik.mns.mnsspb.ru> (raw)
In-Reply-To: <87iq9vgugf.fsf@users.sourceforge.net>

On Thu, Feb 18, 2010 at 02:11:21AM +0000, Pat Thoyts wrote:
> 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>

Now it works, thanks.

Tested-by: Kirill Smelkov <kirr@mns.spb.ru>

> >Git-gui as shipped with todays git.git master is a bit broken:
> >
> >in git.git master (v1.7.0-29-g6d81630), try running:
> >
> >    $ git gui blame xdiff-interface.h
> >
> >Then select first line 'd9ea d9ea   1 #ifndef XDIFF_INTERFACE_H', right
> >click to popup context menu, select "Show History Context" -->
> >
> >--> git gui errors with:
> >
> >    "Error: couldn't change working directory to "": no ...
> >
> >
> >Thanks,
> >Kirill
> 
>  git-gui.sh |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/git-gui.sh b/git-gui.sh
> index 8996d2d..ec81b15 100755
> --- a/git-gui.sh
> +++ b/git-gui.sh
> @@ -1158,6 +1158,9 @@ apply_config
>  # 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 {}} {

      reply	other threads:[~2010-02-19 13:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-17 12:13 [BUG] git-gui blame: "Show History Context" is broken Kirill Smelkov
2010-02-18  2:11 ` [PATCH] Handle failure of core.worktree to identify the working directory Pat Thoyts
2010-02-19 13:55   ` Kirill Smelkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100219135522.GA27417@tugrik.mns.mnsspb.ru \
    --to=kirr@mns.spb.ru \
    --cc=git@vger.kernel.org \
    --cc=patthoyts@users.sourceforge.net \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).