config: clarify memory ownership in git_config_string()
The out parameter of `git_config_string()` is a `const char **` even though we transfer ownership of memory to the caller. This is quite misleading and has led to many memory leaks all over the place. Adapt the parameter to instead be `char **`. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
83024d98f7
commit
1b261c20ed
@ -42,8 +42,8 @@ int is_bare_repository_cfg = -1; /* unspecified */
|
||||
int warn_ambiguous_refs = 1;
|
||||
int warn_on_object_refname_ambiguity = 1;
|
||||
int repository_format_precious_objects;
|
||||
const char *git_commit_encoding;
|
||||
const char *git_log_output_encoding;
|
||||
char *git_commit_encoding;
|
||||
char *git_log_output_encoding;
|
||||
char *apply_default_whitespace;
|
||||
char *apply_default_ignorewhitespace;
|
||||
char *git_attributes_file;
|
||||
@ -58,8 +58,8 @@ size_t packed_git_window_size = DEFAULT_PACKED_GIT_WINDOW_SIZE;
|
||||
size_t packed_git_limit = DEFAULT_PACKED_GIT_LIMIT;
|
||||
size_t delta_base_cache_limit = 96 * 1024 * 1024;
|
||||
unsigned long big_file_threshold = 512 * 1024 * 1024;
|
||||
const char *editor_program;
|
||||
const char *askpass_program;
|
||||
char *editor_program;
|
||||
char *askpass_program;
|
||||
char *excludes_file;
|
||||
enum auto_crlf auto_crlf = AUTO_CRLF_FALSE;
|
||||
enum eol core_eol = EOL_UNSET;
|
||||
|
Reference in New Issue
Block a user