MCPcopy Create free account
hub / github.com/git/git / reftable_index_record_encode

Function reftable_index_record_encode

reftable/record.c:1078–1092  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1076}
1077
1078static 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
1094static int reftable_index_record_decode(void *rec, struct reftable_buf key,
1095 uint8_t val_type REFTABLE_UNUSED,

Callers

nothing calls this directly

Calls 2

put_var_intFunction · 0.85
string_view_consumeFunction · 0.85

Tested by

no test coverage detected