Junio C Hamano <gits...@pobox.com> writes:

> Matthieu Moy <matthieu....@grenoble-inp.fr> writes:
>
>> OK, it seems I got convinced too quickly by Junio ;-). The function
>> produces a char * that can be modified, but it also receives a value,
>> and the function should keep the "const" to allow passing "const char
>> *".
>
> Don't blame me. I never suggested to touch that existing function,
> with existing call sites.

I don't understand what you mean. The new git_config_get_string()
function is meant to be used in essentially every places where
git_config_string() is currently used, so removing the const from
git_config_get_string() raises the same issue as changing the existing
function.

Dropping the const means we won't be able to write

const char *v = "default";
...
git_config_get_string(&v, ...);

-- 
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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to