Junio C Hamano writes:
> Matthieu Moy writes:
>
>> In general, most strings one manipulates are "const char *", it's
>> frequent to modify a pointer to a string, but rather rare to modify the
>> string itself.
>
> We seem to have a disagreement. Unlike git_config_get_value() that
> lets callers
Matthieu Moy writes:
> In general, most strings one manipulates are "const char *", it's
> frequent to modify a pointer to a string, but rather rare to modify the
> string itself.
We seem to have a disagreement. Unlike git_config_get_value() that
lets callers peek the only cached copy, git_conf
Tanay Abhra writes:
>>
>>> + if > + git_config_get_string("core.notesref", (const
>>> char**)¬es_ref_name);
>>
>> This cast is needed only because notes_ref_name is declared as
>> non-const, but a better fix would be to make the variable const, and
>> remove the cast.
>
> Same casts had to
>
>> +if > + git_config_get_string("core.notesref", (const
>> char**)¬es_ref_name);
>
> This cast is needed only because notes_ref_name is declared as
> non-const, but a better fix would be to make the variable const, and
> remove the cast.
Same casts had to be used in imap-send.c patch,
On 21/07/14 12:44, Tanay Abhra wrote:
> Use `git_config_get_*()` family instead of `git_config()` to take advantage of
> the config-set API which provides a cleaner control flow.
>
> Signed-off-by: Tanay Abhra
> ---
> Consider this as a proof of concept as the others callers have to be rewritten
Tanay Abhra writes:
> Consider this as a proof of concept as the others callers have to be rewritten
> as well.
> I think that it is not so buggy as it passes all the tests.
Before and after your patch, git_default_config() is called once per
config key. Before the patch, it made sense, but afte
Use `git_config_get_*()` family instead of `git_config()` to take advantage of
the config-set API which provides a cleaner control flow.
Signed-off-by: Tanay Abhra
---
Consider this as a proof of concept as the others callers have to be rewritten
as well.
I think that it is not so buggy as it pas
7 matches
Mail list logo