summaryrefslogtreecommitdiffstats
path: root/mailmap.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-05-27 13:46:39 +0200
committerJunio C Hamano <gitster@pobox.com>2024-05-27 20:20:00 +0200
commit1b261c20ed28ad26ddbcd3dff94a248ac6866ac8 (patch)
tree2b035eeafac8bc875b83bc643a0bff20aedd53c3 /mailmap.h
parentbuiltin/log: stop using globals for format config (diff)
downloadgit-1b261c20ed28ad26ddbcd3dff94a248ac6866ac8.tar.xz
git-1b261c20ed28ad26ddbcd3dff94a248ac6866ac8.zip
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>
Diffstat (limited to 'mailmap.h')
-rw-r--r--mailmap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/mailmap.h b/mailmap.h
index 429a760945..cbda9bc5e0 100644
--- a/mailmap.h
+++ b/mailmap.h
@@ -4,7 +4,7 @@
struct string_list;
extern char *git_mailmap_file;
-extern const char *git_mailmap_blob;
+extern char *git_mailmap_blob;
int read_mailmap(struct string_list *map);
void clear_mailmap(struct string_list *map);