summaryrefslogtreecommitdiff
path: root/commit-graph.h
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2020-02-03 21:18:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-02-04 19:36:51 (GMT)
commit13c249924995d504001eb8083fac106041b32f98 (patch)
tree124fa563e1c9ed159af34bb8f55255d64f05bed7 /commit-graph.h
parent0bd52e27e315a76d6950fa30ce602eef15d90571 (diff)
downloadgit-13c249924995d504001eb8083fac106041b32f98.zip
git-13c249924995d504001eb8083fac106041b32f98.tar.gz
git-13c249924995d504001eb8083fac106041b32f98.tar.bz2
commit-graph.h: store object directory in 'struct commit_graph'
In a previous patch, the 'char *object_dir' in 'struct commit_graph' was replaced with a 'struct object_directory'. This patch applies the same treatment to 'struct commit_graph', which is another intermediate step towards getting rid of all path normalization in 'commit-graph.c'. Instead of taking a 'char *object_dir', functions that construct a 'struct commit_graph' now take a 'struct object_directory *'. Any code that needs an object directory path use '->path' instead. This ensures that all calls to functions that perform path normalization are given arguments which do not themselves require normalization. This prepares those functions to drop their normalization entirely, which will occur in the subsequent patch. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.h')
-rw-r--r--commit-graph.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/commit-graph.h b/commit-graph.h
index 2a6251b..2448134 100644
--- a/commit-graph.h
+++ b/commit-graph.h
@@ -49,7 +49,7 @@ struct commit_graph {
uint32_t num_commits;
struct object_id oid;
char *filename;
- const char *obj_dir;
+ struct object_directory *odb;
uint32_t num_commits_in_base;
struct commit_graph *base_graph;
@@ -62,7 +62,8 @@ struct commit_graph {
};
struct commit_graph *load_commit_graph_one_fd_st(int fd, struct stat *st);
-struct commit_graph *read_commit_graph_one(struct repository *r, const char *obj_dir);
+struct commit_graph *read_commit_graph_one(struct repository *r,
+ struct object_directory *odb);
struct commit_graph *parse_commit_graph(void *graph_map, int fd,
size_t graph_size);