On 7/31/2014 5:08 PM, Matthieu Moy wrote:
> Matthieu Moy writes:
>
>> Tanay Abhra writes:
>>
>>> On 7/30/2014 7:43 PM, Matthieu Moy wrote:
* if (!values->items[i].string)
config_error_nonbool(
=> This check could be done once and for all in a function, say
Matthieu Moy writes:
> Tanay Abhra writes:
>
>> On 7/30/2014 7:43 PM, Matthieu Moy wrote:
>>> * if (!values->items[i].string)
>>> config_error_nonbool(
>>>
>>> => This check could be done once and for all in a function, say
>>> git_config_get_value_multi_nonbool, a trivial wrapper
Tanay Abhra writes:
> On 7/30/2014 7:43 PM, Matthieu Moy wrote:
>> Tanay Abhra writes:
>>
>>> - git_config(notes_display_config, &load_config_refs);
>>> + if (load_config_refs) {
>>> + values = git_config_get_value_multi("notes.displayref");
>>> + if (values) {
>>> +
On 7/30/2014 7:43 PM, Matthieu Moy wrote:
> Tanay Abhra writes:
>
>> -git_config(notes_display_config, &load_config_refs);
>> +if (load_config_refs) {
>> +values = git_config_get_value_multi("notes.displayref");
>> +if (values) {
>> +for (i =
Tanay Abhra writes:
> - git_config(notes_display_config, &load_config_refs);
> + if (load_config_refs) {
> + values = git_config_get_value_multi("notes.displayref");
> + if (values) {
> + for (i = 0; i < values->nr; i++) {
> +
Use `git_config_get_value_multi()` instead of `git_config()` to take
advantage of the config-set API which provides a cleaner control flow,
also previously 'string_list_add_refs_by_glob()' was called even when
the retrieved value was NULL, correct it while we are at it.
Signed-off-by: Tanay Abhra
6 matches
Mail list logo