@@ -885,8 +885,8 @@ struct write_commit_graph_context {
885
885
struct bloom_filter_settings bloom_settings ;
886
886
};
887
887
888
- static void write_graph_chunk_fanout (struct hashfile * f ,
889
- struct write_commit_graph_context * ctx )
888
+ static int write_graph_chunk_fanout (struct hashfile * f ,
889
+ struct write_commit_graph_context * ctx )
890
890
{
891
891
int i , count = 0 ;
892
892
struct commit * * list = ctx -> commits .list ;
@@ -907,17 +907,21 @@ static void write_graph_chunk_fanout(struct hashfile *f,
907
907
908
908
hashwrite_be32 (f , count );
909
909
}
910
+
911
+ return 0 ;
910
912
}
911
913
912
- static void write_graph_chunk_oids (struct hashfile * f , int hash_len ,
913
- struct write_commit_graph_context * ctx )
914
+ static int write_graph_chunk_oids (struct hashfile * f ,
915
+ struct write_commit_graph_context * ctx )
914
916
{
915
917
struct commit * * list = ctx -> commits .list ;
916
918
int count ;
917
919
for (count = 0 ; count < ctx -> commits .nr ; count ++ , list ++ ) {
918
920
display_progress (ctx -> progress , ++ ctx -> progress_cnt );
919
- hashwrite (f , (* list )-> object .oid .hash , (int )hash_len );
921
+ hashwrite (f , (* list )-> object .oid .hash , (int )the_hash_algo -> rawsz );
920
922
}
923
+
924
+ return 0 ;
921
925
}
922
926
923
927
static const unsigned char * commit_to_sha1 (size_t index , void * table )
@@ -926,8 +930,8 @@ static const unsigned char *commit_to_sha1(size_t index, void *table)
926
930
return commits [index ]-> object .oid .hash ;
927
931
}
928
932
929
- static void write_graph_chunk_data (struct hashfile * f , int hash_len ,
930
- struct write_commit_graph_context * ctx )
933
+ static int write_graph_chunk_data (struct hashfile * f ,
934
+ struct write_commit_graph_context * ctx )
931
935
{
932
936
struct commit * * list = ctx -> commits .list ;
933
937
struct commit * * last = ctx -> commits .list + ctx -> commits .nr ;
@@ -944,7 +948,7 @@ static void write_graph_chunk_data(struct hashfile *f, int hash_len,
944
948
die (_ ("unable to parse commit %s" ),
945
949
oid_to_hex (& (* list )-> object .oid ));
946
950
tree = get_commit_tree_oid (* list );
947
- hashwrite (f , tree -> hash , hash_len );
951
+ hashwrite (f , tree -> hash , the_hash_algo -> rawsz );
948
952
949
953
parent = (* list )-> parents ;
950
954
@@ -1024,10 +1028,12 @@ static void write_graph_chunk_data(struct hashfile *f, int hash_len,
1024
1028
1025
1029
list ++ ;
1026
1030
}
1031
+
1032
+ return 0 ;
1027
1033
}
1028
1034
1029
- static void write_graph_chunk_extra_edges (struct hashfile * f ,
1030
- struct write_commit_graph_context * ctx )
1035
+ static int write_graph_chunk_extra_edges (struct hashfile * f ,
1036
+ struct write_commit_graph_context * ctx )
1031
1037
{
1032
1038
struct commit * * list = ctx -> commits .list ;
1033
1039
struct commit * * last = ctx -> commits .list + ctx -> commits .nr ;
@@ -1076,10 +1082,12 @@ static void write_graph_chunk_extra_edges(struct hashfile *f,
1076
1082
1077
1083
list ++ ;
1078
1084
}
1085
+
1086
+ return 0 ;
1079
1087
}
1080
1088
1081
- static void write_graph_chunk_bloom_indexes (struct hashfile * f ,
1082
- struct write_commit_graph_context * ctx )
1089
+ static int write_graph_chunk_bloom_indexes (struct hashfile * f ,
1090
+ struct write_commit_graph_context * ctx )
1083
1091
{
1084
1092
struct commit * * list = ctx -> commits .list ;
1085
1093
struct commit * * last = ctx -> commits .list + ctx -> commits .nr ;
@@ -1101,10 +1109,11 @@ static void write_graph_chunk_bloom_indexes(struct hashfile *f,
1101
1109
}
1102
1110
1103
1111
stop_progress (& progress );
1112
+ return 0 ;
1104
1113
}
1105
1114
1106
- static void write_graph_chunk_bloom_data (struct hashfile * f ,
1107
- struct write_commit_graph_context * ctx )
1115
+ static int write_graph_chunk_bloom_data (struct hashfile * f ,
1116
+ struct write_commit_graph_context * ctx )
1108
1117
{
1109
1118
struct commit * * list = ctx -> commits .list ;
1110
1119
struct commit * * last = ctx -> commits .list + ctx -> commits .nr ;
@@ -1128,6 +1137,7 @@ static void write_graph_chunk_bloom_data(struct hashfile *f,
1128
1137
}
1129
1138
1130
1139
stop_progress (& progress );
1140
+ return 0 ;
1131
1141
}
1132
1142
1133
1143
static int oid_compare (const void * _a , const void * _b )
@@ -1638,8 +1648,8 @@ static int write_commit_graph_file(struct write_commit_graph_context *ctx)
1638
1648
num_chunks * ctx -> commits .nr );
1639
1649
}
1640
1650
write_graph_chunk_fanout (f , ctx );
1641
- write_graph_chunk_oids (f , hashsz , ctx );
1642
- write_graph_chunk_data (f , hashsz , ctx );
1651
+ write_graph_chunk_oids (f , ctx );
1652
+ write_graph_chunk_data (f , ctx );
1643
1653
if (ctx -> num_extra_edges )
1644
1654
write_graph_chunk_extra_edges (f , ctx );
1645
1655
if (ctx -> changed_paths ) {
0 commit comments