[PATCH 3/3] git-gui: define correct GIT_DIR for gitk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux