891
const struct bloom_filter_settings *bloom_settings;
892
};
893
894
-static void write_graph_chunk_fanout(struct hashfile *f,
895
- struct write_commit_graph_context *ctx)
894
+static int write_graph_chunk_fanout(struct hashfile *f,
895
+ struct write_commit_graph_context *ctx)
896
{
897
int i, count = 0;
898
struct commit **list = ctx->commits.list;
913
914
hashwrite_be32(f, count);
915
}
916
+
917
+ return 0;
918
}
919
918
-static void write_graph_chunk_oids(struct hashfile *f, int hash_len,
919
- struct write_commit_graph_context *ctx)
920
+static int write_graph_chunk_oids(struct hashfile *f,
921
+ struct write_commit_graph_context *ctx)
922
{
923
struct commit **list = ctx->commits.list;
924
int count;
925
for (count = 0; count < ctx->commits.nr; count++, list++) {
926
display_progress(ctx->progress, ++ctx->progress_cnt);
925
- hashwrite(f, (*list)->object.oid.hash, (int)hash_len);
927
+ hashwrite(f, (*list)->object.oid.hash, the_hash_algo->rawsz);
928
}
929
+
930
+ return 0;
931
}
932
933
static const unsigned char *commit_to_sha1(size_t index, void *table)
936
return commits[index]->object.oid.hash;
937
}
938
935
-static void write_graph_chunk_data(struct hashfile *f, int hash_len,
936
- struct write_commit_graph_context *ctx)
939
+static int write_graph_chunk_data(struct hashfile *f,
940
+ struct write_commit_graph_context *ctx)
941
{
942
struct commit **list = ctx->commits.list;
943
struct commit **last = ctx->commits.list + ctx->commits.nr;
954
die(_("unable to parse commit %s"),
955
oid_to_hex(&(*list)->object.oid));
956
tree = get_commit_tree_oid(*list);
953
- hashwrite(f, tree->hash, hash_len);
957
+ hashwrite(f, tree->hash, the_hash_algo->rawsz);
958
959
parent = (*list)->parents;
960
1034
1035
list++;
1036
}
1037
+
1038
+ return 0;
1039
}
1040
1035
-static void write_graph_chunk_extra_edges(struct hashfile *f,
1036
- struct write_commit_graph_context *ctx)
1041
+static int write_graph_chunk_extra_edges(struct hashfile *f,
1042
+ struct write_commit_graph_context *ctx)
1043
{
1044
struct commit **list = ctx->commits.list;
1045
struct commit **last = ctx->commits.list + ctx->commits.nr;
1088
1089
list++;
1090
}
1091
+
1092
+ return 0;
1093
}
1094
1087
-static void write_graph_chunk_bloom_indexes(struct hashfile *f,
1088
- struct write_commit_graph_context *ctx)
1095
+static int write_graph_chunk_bloom_indexes(struct hashfile *f,
1096
+ struct write_commit_graph_context *ctx)
1097
{
1098
struct commit **list = ctx->commits.list;
1099
struct commit **last = ctx->commits.list + ctx->commits.nr;
1116
}
1117
1118
stop_progress(&progress);
1119
+ return 0;
1120
}
1121
1122
static void trace2_bloom_filter_settings(struct write_commit_graph_context *ctx)
1134
jw_release(&jw);
1135
}
1136
1128
-static void write_graph_chunk_bloom_data(struct hashfile *f,
1129
- struct write_commit_graph_context *ctx)
1137
+static int write_graph_chunk_bloom_data(struct hashfile *f,
1138
+ struct write_commit_graph_context *ctx)
1139
{
1140
struct commit **list = ctx->commits.list;
1141
struct commit **last = ctx->commits.list + ctx->commits.nr;
1164
}
1165
1166
stop_progress(&progress);
1167
+ return 0;
1168
}
1169
1170
static int oid_compare(const void *_a, const void *_b)
1681
num_chunks * ctx->commits.nr);
1682
}
1683
write_graph_chunk_fanout(f, ctx);
1674
- write_graph_chunk_oids(f, hashsz, ctx);
1675
- write_graph_chunk_data(f, hashsz, ctx);
1684
+ write_graph_chunk_oids(f, ctx);
1685
+ write_graph_chunk_data(f, ctx);
1686
if (ctx->num_extra_edges)
1687
write_graph_chunk_extra_edges(f, ctx);
1688
if (ctx->changed_paths) {