Re: [PATCH 1/3] submodule.c: add has_submodules to check if we have any submodules

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

 



On 05/18, Stefan Beller wrote:
> >> +static enum {
> >> +     SUBMODULE_CONFIG_NOT_READ = 0,
> >> +     SUBMODULE_CONFIG_NO_CONFIG,
> >> +     SUBMODULE_CONFIG_EXISTS,
> >> +} submodule_config_reading;
> >
> > Any way we can have this not be a global, but rather a parameter?  You
> > could pass in a pointer to this value via the callback data parameter in
> > the submodule_config function.
> 
> As said in the reply to Junio, this patch has been sitting on my hard drive
> for a while and was written before you started the attempt to de-globalize
> the state of git.
> 
> Ideally this setting would be part of the repository object. For example
> the repository object would have a "submodule_config" pointer, initialized
> to NULL, which can then be set to the read config or a static empty_config
> if no such config exists.

I'm not quite sure I agree, or rather we may be talking about two
different things or I'm misinterpreting the patches.  From these patches
it seems like 'submodule_config' that you are refering to is not the
actual submodule configuration but rather some options that are stored
in .git/config or other various config locations (home, system, etc).
What would need to be part of the repository object (and is in my WIP
that I'll hopefully send out so i can get some feedback) would be the
submodule_cache which is the internal representation of a repository's
.gitmodules files.

-- 
Brandon Williams



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