add repository structure

laumann
Oct 17, 2023, 11:19 AM
ZTDGWUGPKDVIUA6V5BZ5ATDTGKZEE6ZZIXLGNTUJU2KIV7H7YSVQC

Dependencies

  • [2] YM2LC6QP wrap vendored blake3 in own file, #2
  • [3] 2OSIAH5Q ani: fix memleak in cmd_main()
  • [4] QSQNGA5K changestore: load changes on demand
  • [5] AHIXA5ZE Get rid of all warnings, rework init code. How do I do multiline messages?
  • [6] JVU3TTT5 all: switch away from typedefing anonymous structs
  • [7] 5D2IYPL7 change: introduce changestore, print deleted lines
  • [8] 733PFZJ5 prefix header guard names with ANI_
  • [9] 2U7P5SFQ Change struct names "struct foo -> typedef struct Foo"
  • [10] RIWSVVAS change: decompress the 'contents' with zstd_seekable
  • [11] ZS3UJEZU change: support version = 4 (noenc) format
  • [12] DRK7G22J Add header guard to commands.h
  • [13] B3XLVPNC Add ani.c and initial Makefile
  • [14] QEFCNNVC change: display offsets for given change file
  • [15] XTKRT6OQ format the codebase
  • [16] LKIBESCN change: adjust function signatures
  • [17] FB67XX5E add argument parsing setup
  • [18] P5CSMRVS change: fix sequence-point warning
  • [19] Q7TKZCJP Add initial support for reading the offsets from a (fixed) change
  • [20] ZPNA2D42 ani: add functions to locate .pijul
  • [21] 3FT3XTJM change: support -v/-h flags
  • [*] PEUS54XQ
  • [*] YG4DZB3A add 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
    [5.80]
    [5.339]
    #include "repository.h"
  • replacement in init.c at line 33
    [5.51][5.173:232]()
    cmd_init(int argc, const char **argv, const char *_ignore)
    [5.51]
    [5.701]
    cmd_init(int argc, const char **argv, struct repository *repo)
  • replacement in commands.h at line 4
    [5.39][5.0:118]()
    int cmd_init(int argc, const char *argv[], const char *);
    int cmd_change(int argc, const char *argv[], const char *);
    [5.39]
    [5.40]
    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
    [5.8141][5.8141:8200]()
    change(const char *hash, int verbose, const char *repodir)
    [5.8141]
    [5.8200]
    change(const char *hash, int verbose, struct repository *repo)
  • replacement in change.c at line 1235
    [5.8293][4.2430:2474]()
    changestoreinit(&changestore, 4, repodir);
    [5.8293]
    [5.8329]
    changestoreinit(&changestore, 4, repo->path);
  • replacement in change.c at line 1238
    [5.8361][5.8361:8428]()
    err = loadchange(&ch->change, &ch->hash, repodir, hash, verbose);
    [5.8361]
    [5.8428]
    err = loadchange(&ch->change, &ch->hash, repo->path, hash, verbose);
  • replacement in change.c at line 1261
    [5.2236][5.179:235]()
    cmd_change(int argc, char **argv, const char *repo_dir)
    [5.2236]
    [5.3043]
    cmd_change(int argc, char **argv, struct repository *repo)
  • replacement in change.c at line 1301
    [5.742][5.236:277]()
    return change(hash, verbose, repo_dir);
    [5.742]
    [5.3099]
    return change(hash, verbose, repo);
  • edit in ani.c at line 8
    [5.1150]
    [5.1732]
    #include "repository.h"
  • replacement in ani.c at line 24
    [5.1205][5.1784:1830]()
    int (*fn)(int, const char **, const char *);
    [5.1205]
    [5.1830]
    int (*fn)(int, const char **, struct repository *);
  • replacement in ani.c at line 36
    [5.1341][5.174:179](),[5.174][5.174:179]()
    void
    [5.1341]
    [5.179]
    static void
  • replacement in ani.c at line 56
    [5.1550][5.1550:1554]()
    int
    [5.1550]
    [5.287]
    static int
  • edit in ani.c at line 61
    [5.1947]
    [5.5683]
    struct repository repo = { 0 };
  • edit in ani.c at line 80
    [5.2075]
    [5.2075]
    repo.path = pijul_dir;
  • replacement in ani.c at line 82
    [5.2078][3.11:56]()
    ret = (command->fn)(argc, argv, pijul_dir);
    [5.2078]
    [3.56]
    ret = (command->fn)(argc, argv, &repo);