diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-05-27 13:46:39 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-05-27 11:20:00 -0700 |
| commit | 1b261c20ed28ad26ddbcd3dff94a248ac6866ac8 (patch) | |
| tree | 2b035eeafac8bc875b83bc643a0bff20aedd53c3 /attr.h | |
| parent | 83024d98f78684fce3d4d0598e6b2b147a4b2ffa (diff) | |
| download | git-1b261c20ed28ad26ddbcd3dff94a248ac6866ac8.tar.gz | |
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 'attr.h')
| -rw-r--r-- | attr.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -236,6 +236,6 @@ const char *git_attr_global_file(void); /* Return whether the system gitattributes file is enabled and should be used. */ int git_attr_system_is_enabled(void); -extern const char *git_attr_tree; +extern char *git_attr_tree; #endif /* ATTR_H */ |
