Re: [PATCH] Fix premature call to git_config() causing t1020-subdirectory to fail

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

 



On Tue, 26 Feb 2008, Johan Herland wrote:

> We need to call git_config(git_default_config) in order to get user.name and
> user.email (so that reflogs will be correct), but if we do it too early, it
> interferes with the setup of reference repos. Therefore, move git_config()
> call to _after_ the reference has been setup (but before we start writing
> reflogs). However, in order for git_config() to read in the global
> configuration at that point, we must unset CONFIG_ENVIRONMENT.
> 
> There are probably better ways of resolving this issue.
> 
> Signed-off-by: Johan Herland <johan@xxxxxxxxxxx>
> ---
> 
> On Tuesday 26 February 2008, Johan Herland wrote:
> > - Call git_config(git_default_config) in order to properly set up
> >   user.name and user.email for reflogs (This BREAKS test #9 in
> >   t1020-subdirectory.sh. Have yet to figure out why)
> 
> Here is a fix for this breakage, although I think it's ugly as hell.
> 
> But with this fix, and the other one I just sent out for the
> for_each_ref() corruption, the whole test suite finally passes on my
> box.
> 
> Feel free to incorporate this into the further builtin-clone work,
> or ignore it, and find better ways of solving these issues.

Actually, I think I'll be leaving CONFIG_ENVIRONMENT alone entirely; I was 
only using it to override the setting that t5505 uses, but t5505 is just 
wrong to set it. So this is the right placement of git_config(), and the 
setenv and unsetenv aren't needed.

	-Daniel
*This .sig left intentionally blank*
-
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