Merge branch 'ds/close-object-store'
authorJunio C Hamano <gitster@pobox.com>
Tue, 9 Jul 2019 22:25:37 +0000 (15:25 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 9 Jul 2019 22:25:37 +0000 (15:25 -0700)
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

12 files changed:
1  2 
builtin/am.c
builtin/clone.c
builtin/fetch.c
builtin/gc.c
builtin/merge.c
builtin/rebase.c
builtin/receive-pack.c
builtin/repack.c
commit-graph.c
packfile.c
packfile.h
upload-pack.c

diff --cc builtin/am.c
Simple merge
diff --cc builtin/clone.c
Simple merge
diff --cc builtin/fetch.c
Simple merge
diff --cc builtin/gc.c
Simple merge
diff --cc builtin/merge.c
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc commit-graph.c
Simple merge
diff --cc packfile.c
Simple merge
diff --cc 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,
diff --cc upload-pack.c
Simple merge