Re: [PATCH v8 0/8] Rewrite `git_config()` using config-set API

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

 



On 08/08/14 15:07, Tanay Abhra wrote:
> On 8/8/2014 2:01 AM, Junio C Hamano wrote:
>> Matthieu Moy <Matthieu.Moy@xxxxxxxxxxxxxxx> writes:
>>
>>>>> Why is this needed? Are you now using key_value_info outside config.c?
>>>>> Or is it a leftover from a previous experiment?
>>>>
>>>> Has this been resolved in the new round?
>>>
>>> Tanay explained in another subthread why this was needed. For callers
>>> iterating over the string_list who want to get the file/line info, they
>>> need to be able to cast the void * pointer to struct key_value_info *.
>>
>> For callers that want to see all the multi-values, it would be
>> preferrable for the iterator to pass the filename and the linenumber
>> to the callback function, instead of exposing its implementation
>> detail as a single string list and telling them to pick it apart,
>> no?
>>
>> Not a very convincing argument, but OK for now in the sense that we
>> can fix it later if we wanted to before it gets too late.
>>
> 
> (cc to Ramsay)
> 
> The discussion in both threads (v8 and v9), boils down to this,
> is the `key_value_info` struct really required to be declared public or should be
> just an implementation detail. I will give you the context,

No, this is not the issue for me. The patch which introduces the
struct in cache.h does not make use of that struct in any interface.
It *is* an implementation detail of some code in config.c only.

I do not know how that structure will be used in future patches. ;-)

ATB,
Ramsay Jones


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