Re: [PATCH 01/15] string_list: add string_list_duplicate
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 27, 2016, 23:17 UTC
- Message-ID
- <xmqqbn4u7ibp.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CAGZ79kagX5TJU_mbjpo4PKJDoc1wh24DhyS814Kkq76EU9aykA@mail.gmail.com>
Stefan Beller <sbeller@google.com> 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 and would not see the result of updates you yourself make to the system.