add repository structure
Dependencies
- [2]
YM2LC6QPwrap vendored blake3 in own file, #2 - [3]
2OSIAH5Qani: fix memleak in cmd_main() - [4]
QSQNGA5Kchangestore: load changes on demand - [5]
AHIXA5ZEGet rid of all warnings, rework init code. How do I do multiline messages? - [6]
JVU3TTT5all: switch away from typedefing anonymous structs - [7]
5D2IYPL7change: introduce changestore, print deleted lines - [8]
733PFZJ5prefix header guard names with ANI_ - [9]
2U7P5SFQChange struct names "struct foo -> typedef struct Foo" - [10]
RIWSVVASchange: decompress the 'contents' with zstd_seekable - [11]
ZS3UJEZUchange: support version = 4 (noenc) format - [12]
DRK7G22JAdd header guard to commands.h - [13]
B3XLVPNCAdd ani.c and initial Makefile - [14]
QEFCNNVCchange: display offsets for given change file - [15]
XTKRT6OQformat the codebase - [16]
LKIBESCNchange: adjust function signatures - [17]
FB67XX5Eadd argument parsing setup - [18]
P5CSMRVSchange: fix sequence-point warning - [19]
Q7TKZCJPAdd initial support for reading the offsets from a (fixed) change - [20]
ZPNA2D42ani: add functions to locate .pijul - [21]
3FT3XTJMchange: support -v/-h flags - [*]
PEUS54XQ - [*]
YG4DZB3Aadd representation of hash, decode dependencies
Change contents
- file addition: repository.h[23.1]
#ifndef ANI_REPOSITORY_H#define ANI_REPOSITORY_H/*** Represents a repository*/struct repository {char *path; /* the root of the repository */};#endif - edit in init.c at line 6
#include "repository.h" - replacement in init.c at line 33
cmd_init(int argc, const char **argv, const char *_ignore)cmd_init(int argc, const char **argv, struct repository *repo) - replacement in commands.h at line 4
int cmd_init(int argc, const char *argv[], const char *);int cmd_change(int argc, const char *argv[], const char *);int cmd_init(int argc, const char *argv[], struct repository *);int cmd_change(int argc, const char *argv[], struct repository *); - edit in change.c at line 14[2.35][24.818]
#include "repository.h" - replacement in change.c at line 1228
change(const char *hash, int verbose, const char *repodir)change(const char *hash, int verbose, struct repository *repo) - replacement in change.c at line 1235
changestoreinit(&changestore, 4, repodir);changestoreinit(&changestore, 4, repo->path); - replacement in change.c at line 1238
err = loadchange(&ch->change, &ch->hash, repodir, hash, verbose);err = loadchange(&ch->change, &ch->hash, repo->path, hash, verbose); - replacement in change.c at line 1261
cmd_change(int argc, char **argv, const char *repo_dir)cmd_change(int argc, char **argv, struct repository *repo) - replacement in change.c at line 1301
return change(hash, verbose, repo_dir);return change(hash, verbose, repo); - edit in ani.c at line 8
#include "repository.h" - replacement in ani.c at line 24
int (*fn)(int, const char **, const char *);int (*fn)(int, const char **, struct repository *); - replacement in ani.c at line 36
voidstatic void - replacement in ani.c at line 56
intstatic int - edit in ani.c at line 61
struct repository repo = { 0 }; - edit in ani.c at line 80
repo.path = pijul_dir; - replacement in ani.c at line 82
ret = (command->fn)(argc, argv, pijul_dir);ret = (command->fn)(argc, argv, &repo);