open_ok = open_commit_graph(graph_name, &fd, &st);
if (!open_ok)
return 0;
- graph = load_commit_graph_one_fd_st(graph_name, fd, &st);
+ graph = load_commit_graph_one_fd_st(fd, &st);
FREE_AND_NULL(graph_name);
if (!graph)
if (!open_ok)
die_errno(_("Could not open commit-graph '%s'"), graph_name);
- graph = load_commit_graph_one_fd_st(graph_name, fd, &st);
+ graph = load_commit_graph_one_fd_st(fd, &st);
if (!graph)
return 1;
return 1;
}
-struct commit_graph *load_commit_graph_one_fd_st(const char *graph_file,
- int fd, struct stat *st)
+struct commit_graph *load_commit_graph_one_fd_st(int fd, struct stat *st)
{
void *graph_map;
size_t graph_size;
if (graph_size < GRAPH_MIN_SIZE) {
close(fd);
- error(_("graph file %s is too small"), graph_file);
+ error(_("commit-graph file is too small"));
return NULL;
}
graph_map = xmmap(NULL, graph_size, PROT_READ, MAP_PRIVATE, fd, 0);
if (!open_ok)
return NULL;
- return load_commit_graph_one_fd_st(graph_file, fd, &st);
+ return load_commit_graph_one_fd_st(fd, &st);
}
static void prepare_commit_graph_one(struct repository *r, const char *obj_dir)
const unsigned char *chunk_extra_edges;
};
-struct commit_graph *load_commit_graph_one_fd_st(const char *graph_file,
- int fd, struct stat *st);
+struct commit_graph *load_commit_graph_one_fd_st(int fd, struct stat *st);
struct commit_graph *parse_commit_graph(void *graph_map, int fd,
size_t graph_size);