files_ref_store: put the packed files lock directly in this struct
commit00d174489e9905411dbae5f895758f2ca489bd9f
authorMichael Haggerty <mhagger@alum.mit.edu>
Mon, 22 May 2017 14:17:41 +0000 (22 16:17 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 23 May 2017 05:29:54 +0000 (23 14:29 +0900)
tree54073827f0e97261fa574cc5023e800e0f8b08cd
parent55c6bc37c90e134e9da39b8cce1f3084318374d3
files_ref_store: put the packed files lock directly in this struct

Instead of using a global `lock_file` instance for the main
"packed-refs" file and using a pointer in `files_ref_store` to keep
track of whether it is locked, embed the `lock_file` instance directly
in the `files_ref_store` struct and use the new
`is_lock_file_locked()` function to keep track of whether it is
locked. This keeps related data together and makes the main reference
store less of a special case.

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