From: Junio C Hamano Date: Tue, 9 Jul 2019 22:25:37 +0000 (-0700) Subject: Merge branch 'ds/close-object-store' X-Git-Tag: v2.23.0-rc0~85 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/5cb7c73589059b557f0d690ed6bcfde46ef2d234 Merge branch 'ds/close-object-store' The commit-graph file is now part of the "files that the runtime may keep open file descriptors on, all of which would need to be closed when done with the object store", and the file descriptor to an existing commit-graph file now is closed before "gc" finalizes a new instance to replace it. * ds/close-object-store: packfile: rename close_all_packs to close_object_store packfile: close commit-graph in close_all_packs commit-graph: use raw_object_store when closing --- 5cb7c73589059b557f0d690ed6bcfde46ef2d234 diff --cc packfile.h index b678d35c0b,e95e389eb8..81e868d55a --- a/packfile.h +++ b/packfile.h @@@ -81,19 -74,17 +81,19 @@@ int open_pack_index(struct packed_git * * munmap the index file for the specified packfile (if it is * currently mmapped). */ -extern void close_pack_index(struct packed_git *); +void close_pack_index(struct packed_git *); + +int close_pack_fd(struct packed_git *p); -extern uint32_t get_pack_fanout(struct packed_git *p, uint32_t value); +uint32_t get_pack_fanout(struct packed_git *p, uint32_t value); -extern unsigned char *use_pack(struct packed_git *, struct pack_window **, off_t, unsigned long *); -extern void close_pack_windows(struct packed_git *); -extern void close_pack(struct packed_git *); -extern void close_object_store(struct raw_object_store *o); -extern void unuse_pack(struct pack_window **); -extern void clear_delta_base_cache(void); -extern struct packed_git *add_packed_git(const char *path, size_t path_len, int local); +unsigned char *use_pack(struct packed_git *, struct pack_window **, off_t, unsigned long *); +void close_pack_windows(struct packed_git *); +void close_pack(struct packed_git *); - void close_all_packs(struct raw_object_store *o); ++void close_object_store(struct raw_object_store *o); +void unuse_pack(struct pack_window **); +void clear_delta_base_cache(void); +struct packed_git *add_packed_git(const char *path, size_t path_len, int local); /* * Make sure that a pointer access into an mmap'd index file is within bounds,