change: decode metadata bytes
Dependencies
- [2]
4RYULBDDbincode: introduce a bincode_state struct - [3]
YG4DZB3Aadd representation of hash, decode dependencies - [*]
Q7TKZCJPAdd initial support for reading the offsets from a (fixed) change - [*]
OBKF6SIIchange: decompress the hashed section too - [*]
Y26WT3ZFchange: decode message, description and timestamp
Change contents
- edit in change.c at line 298
- edit in change.c at line 300
/* metadata: Vec<u8> */len = bincode_getu64(&binstat);if (len > 0) {uint8_t *bytes = bincode_getbytes(&binstat, len);dump_buf("metadata", bytes, len);free(bytes);}dump_buf("buf", binstat.buf, binstat.avail);/* changes (without the contents): Vec<Hunk> *//* Hash of contents */ - edit in bincode.h at line 45[2.1120][7.2543]
uint8_t *bincode_getbytes(struct bincode_state *, size_t); - edit in bincode.c at line 86[7.3462][7.3462]
}uint8_t *bincode_getbytes(struct bincode_state*s, size_t len){uint8_t *ret;ret = xmalloc(len);memcpy(ret, s->buf, len);s->buf += len;s->avail -= len;return ret;