Re: [PATCH 01/15] string_list: add string_list_duplicate

2016-04-27 Thread Stefan Beller
On Wed, Apr 27, 2016 at 4:17 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> Another way to corrupt it is to change the configuration (e.g. add >> things to the config hashmap such that it reallocates and grows). > > You're right. But doesn't it hint that there is a deeper problem? > > By

Re: [PATCH 01/15] string_list: add string_list_duplicate

2016-04-27 Thread Junio C Hamano
Stefan Beller writes: > Another way to corrupt it is to change the configuration (e.g. add > things to the config hashmap such that it reallocates and grows). You're right. But doesn't it hint that there is a deeper problem? By making a copy and keeping it, you would hold onto a stale value an

Re: [PATCH 01/15] string_list: add string_list_duplicate

2016-04-27 Thread Stefan Beller
On Wed, Apr 27, 2016 at 2:11 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> When not duplicating git_config_get_value_multi("submodule.defaultGroup"); >> I run into >> >> Program received signal SIGSEGV, Segmentation fault. >> ... >> So the string list seems to be corrupted here. >> Someo

Re: [PATCH 01/15] string_list: add string_list_duplicate

2016-04-27 Thread Junio C Hamano
Stefan Beller writes: > When not duplicating git_config_get_value_multi("submodule.defaultGroup"); > I run into > > Program received signal SIGSEGV, Segmentation fault. > ... > So the string list seems to be corrupted here. > Someone stomping over our memory? How long is the result > of git_confi

Re: [PATCH 01/15] string_list: add string_list_duplicate

2016-04-27 Thread Stefan Beller
On Tue, Apr 26, 2016 at 3:37 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> The result of git_config_get_value_multi do not seem to be stable and >> may get overwritten. Have an easy way to preserve the results of that >> query. >> >> Signed-off-by: Stefan Beller >> --- > > This morning

Re: [PATCH 01/15] string_list: add string_list_duplicate

2016-04-26 Thread Junio C Hamano
Stefan Beller writes: > The result of git_config_get_value_multi do not seem to be stable and > may get overwritten. Have an easy way to preserve the results of that > query. > > Signed-off-by: Stefan Beller > --- This morning I reviewed a patch that adds something whose name ends with _copy(),

[PATCH 01/15] string_list: add string_list_duplicate

2016-04-26 Thread Stefan Beller
The result of git_config_get_value_multi do not seem to be stable and may get overwritten. Have an easy way to preserve the results of that query. Signed-off-by: Stefan Beller --- string-list.c | 18 ++ string-list.h | 2 ++ 2 files changed, 20 insertions(+) diff --git a/string