Re: What's cooking in git.git (topics)

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

 



On Feb 7, 2008 6:05 AM, Jeff King <peff@xxxxxxxx> wrote:
> On Wed, Feb 06, 2008 at 06:03:51PM -0800, Junio C Hamano wrote:
>
> > * lh/gitdir (Mon Feb 4 21:59:21 2008 +0100) 4 commits
> >  - git-submodule: prepare for the .git-file
> >  - Add tests for .git file
> >  - Document the .git-file
> >  - Add platform-independent .git "symlink"
> >
> > Seems to have funny interaction with Jeff King's test script
> > updates.
>
> I think this is a bug in Lars' code. The problem is that even though we
> set GIT_DIR to the contents of the '.git' file, we may already have run
> setup_git_env, which creates and remembers paths like '.git/objects'.

Yeah, we need to run set_git_dir() to get all the paths set correctly:

diff --git a/setup.c b/setup.c
index 2cbda91..64b069f 100644
--- a/setup.c
+++ b/setup.c
@@ -339,7 +339,8 @@ const char *setup_git_directory_gently(int *nongit_ok)
        for (;;) {
                gitfile_dir = read_gitfile_gently(DEFAULT_GIT_DIR_ENVIRONMENT);
                if (gitfile_dir) {
-                       setenv(GIT_DIR_ENVIRONMENT, gitfile_dir, 1);
+                       if (set_git_dir(gitfile_dir))
+                               return NULL;
                        break;
                }
                if (is_git_directory(DEFAULT_GIT_DIR_ENVIRONMENT))

But this isn't enough either, git-sh-setup.sh needs a patch when
setting GIT_DIR and I just noticed merge-recursive failing (it needs
to call setup_git_directory() in it's main()).

I'll work on this tonight.

-- 
larsh
-
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