These patches are re-rolled onto master. This patch series provides an API for external code to invalidate the ref cache that is used internally to refs.c. It also allows code *within* refs.c to invalidate only the packed or only the loose refs for a module/submodule. IMPORTANT: I won't myself have time to figure out who, outside of refs.c, has to *call* invalidate_ref_cache(). The candidates that I know off the top of my head are git-clone, git-submodule [1], and git-pack-refs. It would be great if experts in those areas would insert calls to invalidate_ref_cache() where needed. Even better would be if the meddlesome code were changed to use the refs API. I'd be happy to help expanding the refs API if needed to accommodate your needs. This is why the API for invalidating only packed or loose refs is private. After code outside refs.c is changed to use the refs API, it will get the optimal behavior for free (and at that time invalidate_ref_cache() can be removed again). [1] http://marc.info/?l=git&m=131827641227965&w=2 In this mailing list thread, Heiko Voigt stated that git-submodule does not modify any references, so it should not have to use the API. Michael Haggerty (7): invalidate_ref_cache(): rename function from invalidate_cached_refs() invalidate_ref_cache(): take the submodule as parameter invalidate_ref_cache(): expose this function in refs API clear_cached_refs(): rename parameter clear_cached_refs(): extract two new functions write_ref_sha1(): only invalidate the loose ref cache clear_cached_refs(): inline function refs.c | 31 +++++++++++++++++-------------- refs.h | 8 ++++++++ 2 files changed, 25 insertions(+), 14 deletions(-) -- 1.7.7.rc2 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html