Re: [PATCH 4/4] config: don't implicitly use gitdir

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

 



Hi again,

Brandon Williams wrote:
> On 06/12, Jonathan Nieder wrote:

>> Alternatively, could this patch rename git_config_with_options?  That
>> way any other patch in flight that calls git_config_with_options would
>> conflict with this patch, giving us an opportunity to make sure it
>> also sets git_dir.  As another nice side benefit it would make it easy
>> for someone reading the patch to verify it didn't miss any callers.
[...]
> And I don't know if I agree with renaming a function just to rename it.

I forgot to say: another way to accomplish the same thing can be to
reorder the function's arguments.  The relevant thing is to make code
that calls the function without being aware of the new requirements
fail to compile.

[...]
>> Brandon Williams wrote:

>>>  	opts.respect_includes = 1;
>>> +	if (have_git_dir())
>>> +		opts.git_dir = get_git_common_dir();
>>
>> curious: Why get_git_common_dir() instead of get_git_dir()?
>
> Needs to be commondir since the config is stored in the common git
> directory and not a per worktree git directory.

*puzzled* Why wasn't this needed before, then?  The rest of the patch
should result in no functional change, but this part seems different.

Please add some explanation to the commit message.

Thanks,
Jonathan



[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]