Junio C Hamano gits...@pobox.com writes:
Matthieu Moy matthieu@grenoble-inp.fr 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
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 tanay...@gmail.com
---
Consider this as a proof of concept as the others callers have to be rewritten
as well.
I think that it is not
Tanay Abhra tanay...@gmail.com 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
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 tanay...@gmail.com
---
Consider this as a proof of concept as the others callers have to
+if + git_config_get_string(core.notesref, (const
char**)notes_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, I will
Tanay Abhra tanay...@gmail.com writes:
+ if + git_config_get_string(core.notesref, (const
char**)notes_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
Matthieu Moy matthieu@grenoble-inp.fr 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
7 matches
Mail list logo