change: add cli option to do "raw" dump
Dependencies
- [2]
ZS3UJEZUchange: support version = 4 (noenc) format - [3]
ZTDGWUGPadd repository structure - [4]
2U7P5SFQChange struct names "struct foo -> typedef struct Foo" - [5]
RRYWNHFEchange: pass verbose to print_atom() - [6]
LKIBESCNchange: adjust function signatures - [7]
Q7TKZCJPAdd initial support for reading the offsets from a (fixed) change - [8]
QEFCNNVCchange: display offsets for given change file - [9]
5D2IYPL7change: introduce changestore, print deleted lines - [10]
RIWSVVASchange: decompress the 'contents' with zstd_seekable - [11]
3FT3XTJMchange: support -v/-h flags - [12]
XTKRT6OQformat the codebase - [13]
55IIUFZGchange: remove debugging line - [14]
QSQNGA5Kchangestore: load changes on demand
Change contents
- edit in change.c at line 730
}voidprint_raw_change(struct changestore *changes, struct change *ch){usize i;printf("offsets\n");printf(" version: %lu\n", ch->offsets.version);printf(" hashed_len: %lu\n", ch->offsets.hashed_len);printf(" unhashed_off: %lu\n", ch->offsets.unhashed_off);printf(" unhashed_len: %lu\n", ch->offsets.unhashed_len);printf(" contents_off: %lu\n", ch->offsets.contents_off);printf(" contents_len: %lu\n", ch->offsets.contents_len);printf(" total: %lu\n", ch->offsets.total);printf("\n");if (ch->offsets.contents_len > 0) {printf("contents: [");printf("0x%02x", ch->contents[0]);for (i = 1; i < ch->offsets.contents_len; i++) {printf(", 0x%02x", ch->contents[i]);}printf("]\n");} - replacement in change.c at line 1167
change(const char *hash, int verbose, struct repository *repo)change(const char *hash, int verbose, int raw, struct repository *repo) - replacement in change.c at line 1185
print_change(&changestore, &ch->change.hashed, ch->change.contents, verbose);if (raw)print_raw_change(&changestore, &ch->change);elseprint_change(&changestore, &ch->change.hashed, ch->change.contents,verbose); - replacement in change.c at line 1201
printf("ani change [-h] [-v] <hash>\n");printf("ani change [-h] [-r] [-v] <hash>\n"); - edit in change.c at line 1210
int raw; - replacement in change.c at line 1215
while ((c = getopt(argc, argv, "hv")) != -1) {while ((c = getopt(argc, argv, "hrv")) != -1) { - edit in change.c at line 1219
break;case 'r':raw = 1; - replacement in change.c at line 1249
return change(hash, verbose, repo);return change(hash, verbose, raw, repo);