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

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Matthieu Moy <Matthieu.Moy@xxxxxxxxxxxxxxx> writes:
>
>> Tanay Abhra <tanayabh@xxxxxxxxx> writes:
>>
>>> --- a/cache.h
>>> +++ b/cache.h
>>> @@ -1406,8 +1406,14 @@ extern int git_config_get_bool(const char *key, int *dest);
>> [...]
>>> +struct key_value_info {
>>> +	const char *filename;
>>> +	int linenr;
>>> +};
>> [...]
>>> diff --git a/config.c b/config.c
>>> index cf9124f..427850a 100644
>>> --- a/config.c
>>> +++ b/config.c
>>> @@ -1224,11 +1224,6 @@ int git_config_with_options(config_fn_t fn, void *data,
>>>  	return ret;
>>>  }
>>>  
>>> -struct key_value_info {
>>> -	const char *filename;
>>> -	int linenr;
>>> -};
>>> -
>>
>> 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 *.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
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]