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

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

 



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'.

It worked with the old tests because we set GIT_CONFIG, which meant that
looking at the config didn't require actually finding the .git
directory. But now that we don't set GIT_CONFIG, setup_git_env gets
called much earlier (to find the right config file). And I think this is
a vindication of my change, since it reflects real world usage much more
-- I can't even get the hash-object test to pass if I do it by hand,
even though the test script passed.

The solution is probably to intercept the lookup of the .git directory
in setup_git_env, and read the .git file there (this should probably get
pulled out as a git_dir() function or similar).

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