| 1076 | } |
| 1077 | |
| 1078 | static int reftable_index_record_encode(const void *rec, struct string_view out, |
| 1079 | uint32_t hash_size REFTABLE_UNUSED) |
| 1080 | { |
| 1081 | const struct reftable_index_record *r = |
| 1082 | (const struct reftable_index_record *)rec; |
| 1083 | struct string_view start = out; |
| 1084 | |
| 1085 | int n = put_var_int(&out, r->offset); |
| 1086 | if (n < 0) |
| 1087 | return n; |
| 1088 | |
| 1089 | string_view_consume(&out, n); |
| 1090 | |
| 1091 | return start.len - out.len; |
| 1092 | } |
| 1093 | |
| 1094 | static int reftable_index_record_decode(void *rec, struct reftable_buf key, |
| 1095 | uint8_t val_type REFTABLE_UNUSED, |
nothing calls this directly
no test coverage detected