return 0;
}
-#define prepare_commit_graft(r) prepare_commit_graft_##r()
-static void prepare_commit_graft_the_repository(void)
+static void prepare_commit_graft(struct repository *r)
{
- static int commit_graft_prepared;
char *graft_file;
- if (commit_graft_prepared)
+ if (r->parsed_objects->commit_graft_prepared)
return;
- graft_file = get_graft_file(the_repository);
- read_graft_file(the_repository, graft_file);
+ graft_file = get_graft_file(r);
+ read_graft_file(r, graft_file);
/* make sure shallows are read */
- is_repository_shallow(the_repository);
- commit_graft_prepared = 1;
+ is_repository_shallow(r);
+ r->parsed_objects->commit_graft_prepared = 1;
}
struct commit_graft *lookup_commit_graft_the_repository(const struct object_id *oid)
int is_shallow;
struct stat_validity *shallow_stat;
char *alternate_shallow_file;
+
+ int commit_graft_prepared;
};
struct parsed_object_pool *parsed_object_pool_new(void);