commit-graph: don't pass filename to load_commit_graph_one_fd_st()
An earlier change implemented load_commit_graph_one_fd_st() in a way
that was bug-compatible with earlier code in terms of the "graph file
%s is too small" error message printing out the path to the
commit-graph (".git/objects/info/commit-graph").
But change that, because:
* A function that takes an already-open file descriptor also needing
the filename isn't very intuitive.
* The vast majority of errors we might emit when loading the graph
come from parse_commit_graph(), which doesn't report the
filename. Let's not do that either in this case for consistency.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
61df89c8e5
commit
67a530fab3
@ -53,8 +53,7 @@ struct commit_graph {
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user