Re: [PATCH 0/6] [RFC] config.c: use struct for config reading state

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> If you include "populate from system-wide, per-user, and repository
> specific configuration files" as part of the API being libified,
> your configsets cannot avoid being tied to a repository.  But I do
> not think the reader needs to be in the repository.
>
> [...]
>
> Isn't the use of the reader object purely transitory while you
> populate the keys and values in a configset from a single file?  At
> the layer to read and populate a configset from a single "source"
> file, you still do not need repository.
>
> [...]
> Only when you say "I have a 'repo' instance and I want to read the
> config variables from appropriate places", you call such a "read and
> populate configset from a single source" helper three or four times
> to populate repo->config.  Once a configset is populated, it or its
> contents do not depend on the reader instance to function, so I do
> not see how it benefits to have the reader in the repository object.

Yes, exactly. Having a config_set on the repository makes sense, but I
don't see a good reason to have the reader on the repository.

If Ævar sends his series soon, it would be fruitful to see how that
series interacts with this one :)




[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