| 1170 | }; |
| 1171 | |
| 1172 | static int write_graph_chunk_fanout(struct hashfile *f, |
| 1173 | void *data) |
| 1174 | { |
| 1175 | struct write_commit_graph_context *ctx = data; |
| 1176 | int i, count = 0; |
| 1177 | struct commit **list = ctx->commits.items; |
| 1178 | |
| 1179 | /* |
| 1180 | * Write the first-level table (the list is sorted, |
| 1181 | * but we use a 256-entry lookup to be able to avoid |
| 1182 | * having to do eight extra binary search iterations). |
| 1183 | */ |
| 1184 | for (i = 0; i < 256; i++) { |
| 1185 | while (count < ctx->commits.nr) { |
| 1186 | if ((*list)->object.oid.hash[0] != i) |
| 1187 | break; |
| 1188 | display_progress(ctx->progress, ++ctx->progress_cnt); |
| 1189 | count++; |
| 1190 | list++; |
| 1191 | } |
| 1192 | |
| 1193 | hashwrite_be32(f, count); |
| 1194 | } |
| 1195 | |
| 1196 | return 0; |
| 1197 | } |
| 1198 | |
| 1199 | static int write_graph_chunk_oids(struct hashfile *f, |
| 1200 | void *data) |
nothing calls this directly
no test coverage detected