| 221 | } |
| 222 | |
| 223 | static int commit_graph_compatible(struct repository *r) |
| 224 | { |
| 225 | if (!r->gitdir) |
| 226 | return 0; |
| 227 | |
| 228 | if (replace_refs_enabled(r)) { |
| 229 | prepare_replace_object(r); |
| 230 | if (oidmap_get_size(&r->objects->replace_map)) |
| 231 | return 0; |
| 232 | } |
| 233 | |
| 234 | prepare_commit_graft(r); |
| 235 | if (r->parsed_objects && |
| 236 | (r->parsed_objects->grafts_nr || r->parsed_objects->substituted_parent)) |
| 237 | return 0; |
| 238 | if (is_repository_shallow(r)) |
| 239 | return 0; |
| 240 | |
| 241 | return 1; |
| 242 | } |
| 243 | |
| 244 | int open_commit_graph(const char *graph_file, int *fd, struct stat *st) |
| 245 | { |
no test coverage detected