diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2013-06-20 10:37:47 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-20 15:50:17 -0700 |
commit | 5f5e2a8868e2b5792bf467799339e3288282e91e (patch) | |
tree | 7bd4d9e06957d9ab93ba705e698fb15119f0ca60 /t/t4013/diff.log_--root_master | |
parent | refs: implement simple transactions for the packed-refs file (diff) | |
download | tgif-5f5e2a8868e2b5792bf467799339e3288282e91e.tar.xz |
refs: manage lifetime of packed refs cache via reference counting
In struct packed_ref_cache, keep a count of the number of users of the
data structure. Only free the packed ref cache when the reference
count goes to zero rather than when the packed ref cache is cleared.
This mechanism will be used to prevent the cache data structure from
being freed while it is being iterated over.
So far, only the reference in struct ref_cache::packed is counted;
other users will be adjusted in separate commits.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.log_--root_master')
0 files changed, 0 insertions, 0 deletions