]> git.ipfire.org Git - thirdparty/git.git/commit - refs.c
refs: do not invalidate the packed-refs cache unnecessarily
authorMichael Haggerty <mhagger@alum.mit.edu>
Thu, 20 Jun 2013 08:37:54 +0000 (10:37 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 20 Jun 2013 22:50:17 +0000 (15:50 -0700)
commit5d478f5ca1792e7576ac13aaf75f09099ce99afb
treef56bfe08efd52d5c419ed2f0875e37b9c26c10cb
parent98eeb09e8acb6cbe0b0da3b1772b6676fe6d167f
refs: do not invalidate the packed-refs cache unnecessarily

Now that we keep track of the packed-refs file metadata, we can detect
when the packed-refs file has been modified since we last read it, and
we do so automatically every time that get_packed_ref_cache() is
called.  So there is no need to invalidate the cache automatically
when lock_packed_refs() is called; usually the old copy will still be
valid.

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