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
This commit is contained in:
@ -361,10 +361,10 @@ int generation_numbers_enabled(struct repository *r)
|
||||
return !!first_generation;
|
||||
}
|
||||
|
||||
void close_commit_graph(struct repository *r)
|
||||
void close_commit_graph(struct raw_object_store *o)
|
||||
{
|
||||
free_commit_graph(r->objects->commit_graph);
|
||||
r->objects->commit_graph = NULL;
|
||||
free_commit_graph(o->commit_graph);
|
||||
o->commit_graph = NULL;
|
||||
}
|
||||
|
||||
static int bsearch_graph(struct commit_graph *g, struct object_id *oid, uint32_t *pos)
|
||||
@ -1093,7 +1093,7 @@ static int write_commit_graph_file(struct write_commit_graph_context *ctx)
|
||||
stop_progress(&ctx->progress);
|
||||
strbuf_release(&progress_title);
|
||||
|
||||
close_commit_graph(ctx->r);
|
||||
close_commit_graph(ctx->r->objects);
|
||||
finalize_hashfile(f, NULL, CSUM_HASH_IN_STREAM | CSUM_FSYNC);
|
||||
commit_lock_file(&lk);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user