do_for_each_entry(): increment the packed refs cache refcount
commit8baf2bb99a22f8265a26d97f706a27e39911f69e
authorMichael Haggerty <mhagger@alum.mit.edu>
Thu, 20 Jun 2013 08:37:48 +0000 (20 10:37 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 20 Jun 2013 22:50:17 +0000 (20 15:50 -0700)
treef897080265b79b6f81cb6ffad650919ab72b8d71
parent5f5e2a8868e2b5792bf467799339e3288282e91e
do_for_each_entry(): increment the packed refs cache refcount

This function calls a user-supplied callback function which could do
something that causes the packed refs cache to be invalidated.  So
acquire a reference count on the data structure to prevent our copy
from being freed while we are iterating over it.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c