From: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
To: git@vger.kernel.org
Cc: "Shawn O. Pearce" <spearce@spearce.org>,
Junio C Hamano <gitster@pobox.com>,
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Subject: [PATCH 3/3] git-gui: define correct GIT_DIR for gitk
Date: Mon, 9 Feb 2009 03:00:50 +0100 [thread overview]
Message-ID: <1234144850-2903-4-git-send-email-giuseppe.bilotta@gmail.com> (raw)
In-Reply-To: <1234144850-2903-1-git-send-email-giuseppe.bilotta@gmail.com>
When invoking gitk, git-gui assumed that the worktree was the dirname of
$_gitdir and that, by consequence, the git dir could be set to the tail of
$_gitdir once we changed to the worktree root directory.
The assumption is no longer true since the previous commit introduced
support for more generic worktree locations, so export a GIT_DIR
environment variable set to the full, normalized path of $_gitdir
instead.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
---
git-gui/git-gui.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 94317c7..de3f29c 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -1908,7 +1908,7 @@ proc do_gitk {revs} {
set pwd [pwd]
cd $_gitworktree
- set env(GIT_DIR) [file tail [gitdir]]
+ set env(GIT_DIR) [file normalize [gitdir]]
eval exec $cmd $revs &
--
1.6.2.rc0.173.g5e148
next prev parent reply other threads:[~2009-02-09 2:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-09 2:00 [PATCH 0/3] git-gui: generic and robust worktree/gitdir support Giuseppe Bilotta
2009-02-09 2:00 ` [PATCH 1/3] git-gui: properly check for a bare repo Giuseppe Bilotta
2009-02-18 17:16 ` Shawn O. Pearce
2009-02-18 21:47 ` Giuseppe Bilotta
2009-02-18 21:53 ` Shawn O. Pearce
2009-02-09 2:00 ` [PATCH 2/3] git-gui: use the actual worktree Giuseppe Bilotta
2009-02-18 17:22 ` Shawn O. Pearce
2009-02-09 2:00 ` Giuseppe Bilotta [this message]
2009-02-18 17:22 ` [PATCH 3/3] git-gui: define correct GIT_DIR for gitk Shawn O. Pearce
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=1234144850-2903-4-git-send-email-giuseppe.bilotta@gmail.com \
--to=giuseppe.bilotta@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--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).