summaryrefslogtreecommitdiff
path: root/Documentation/technical/api-object-access.txt
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-05-10 08:13:10 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-05-10 18:33:09 +0900
commit74373b5f10e2e8720ad2ae8211811757601550fd (patch)
treee1052290a093b3790bed21da2ed78fccc37deee1 /Documentation/technical/api-object-access.txt
parentPrepare for 2.15.2 (diff)
downloadtgif-74373b5f10e2e8720ad2ae8211811757601550fd.tar.xz
repository: fix free problem with repo_clear(the_repository)
the_repository is special. One of the special things about it is that it does not allocate a new index_state object like submodules but points to the global the_index variable instead. As a global variable, the_index cannot be free()'d. Add an exception for this in repo_clear(). In the future perhaps we would be able to allocate the_repository's index on heap too. Then we can revert this. the_repository->index remains pointed to a clean the_index even after repo_clear() so that it could still be used next time (e.g. in a crazy use case where a dev switches repo in the same process). Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/technical/api-object-access.txt')
0 files changed, 0 insertions, 0 deletions