Matthieu Moy writes:
> Junio C Hamano writes:
>
>> *1* We have safe_create_leading_directories_const() that works
>> around this for input parameter around its _const less counterpart,
>> which is ugly but livable solution.
>
> I think it would actually be a reasonable solution to avoid casting
Junio C Hamano writes:
> *1* We have safe_create_leading_directories_const() that works
> around this for input parameter around its _const less counterpart,
> which is ugly but livable solution.
I think it would actually be a reasonable solution to avoid casting here
and there on the caller sid
Jeff King writes:
> So I would not mind lifting this unnecessary restriction on
> git_config_string, but I do not see a way to do it without making the
> rest of the code much uglier (and I do not see a particular advantage in
> modifying git_config_string here that would make it worth the troubl
Junio C Hamano writes:
> Matthieu Moy 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 ne
Matthieu Moy 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 existin
On 7/22/2014 5:14 PM, Matthieu Moy wrote:
> Jeff King writes:
>
>> will complain that we are passing a pointer to "const char *", not a
>> pointer to "char *". And indeed, compiling with your patch introduces a
>> ton of compiler warnings.
>
> Tanay: are you not compiling with gcc -Wall -Werro
Jeff King writes:
> will complain that we are passing a pointer to "const char *", not a
> pointer to "char *". And indeed, compiling with your patch introduces a
> ton of compiler warnings.
Tanay: are you not compiling with gcc -Wall -Werror?
(see my earlier message, just create a file config.
On 7/22/2014 4:37 PM, Jeff King wrote:
> On Tue, Jul 22, 2014 at 03:49:56AM -0700, Tanay Abhra wrote:
>
>> `git_config_string()` output parameter `dest` is declared as a const
>> which is unnecessary as the caller of the function is given a strduped
>> string which can be modified without causin
On Tue, Jul 22, 2014 at 03:49:56AM -0700, Tanay Abhra wrote:
> `git_config_string()` output parameter `dest` is declared as a const
> which is unnecessary as the caller of the function is given a strduped
> string which can be modified without causing any harm.
>
> Thus, remove the const from the
`git_config_string()` output parameter `dest` is declared as a const
which is unnecessary as the caller of the function is given a strduped
string which can be modified without causing any harm.
Thus, remove the const from the function signature.
Signed-off-by: Tanay Abhra
---
cache.h | 2 +-
10 matches
Mail list logo