]> git.ipfire.org Git - thirdparty/git.git/commit
read_packed_refs(): do more of the work of reading packed refs
authorMichael Haggerty <mhagger@alum.mit.edu>
Mon, 22 May 2017 14:17:50 +0000 (16:17 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 23 May 2017 05:29:55 +0000 (14:29 +0900)
commit099a912a279415dd27716ee5de07ff347bfc49da
treed5c4bff50ad6faf92850d84076a7c51a3880fc3d
parent28ed9830b1dc65df37bdb3c9b8ef743f1f266262
read_packed_refs(): do more of the work of reading packed refs

Teach `read_packed_refs()` to also

* Allocate and initialize the new `packed_ref_cache`
* Open and close the `packed-refs` file
* Update the `validity` field of the new object

This decreases the coupling between `packed_refs_cache` and
`files_ref_store` by a little bit.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs/files-backend.c
refs/ref-cache.h