change: add vertexeq, fix deleted lines duplication
Dependencies
- [2]
SADDDVGOmakefile: add target to generate TAGS file - [3]
5D2IYPL7change: introduce changestore, print deleted lines - [4]
YDQLW2ZOchange: rework printing of patches - print Edit and Newvertex types - [*]
JAGXXSR7change: initial work on decoding hunks - [*]
JVU3TTT5all: switch away from typedefing anonymous structs - [*]
PEUS54XQ - [*]
XJ2PEH74add meson.build - [*]
L3HKOF4Wwrap vendored zstd seekable in own file, #2 - [*]
YG4DZB3Aadd representation of hash, decode dependencies - [*]
Q7TKZCJPAdd initial support for reading the offsets from a (fixed) change - [*]
B3XLVPNCAdd ani.c and initial Makefile - [*]
NETL2N53Makefile: add check target
Change contents
- edit in vertex.h at line 40
int vertexeq(struct vertex *v1, struct vertex *v2); - file addition: vertex.c[8.1]
#include <stdint.h>#include <stddef.h>#include "common.h"#include "hash.h"#include "vertex.h"intvertexeq(struct vertex *v1, struct vertex *v2){return hasheq(&v1->change, &v2->change) && v1->start == v2->start &&v1->end == v2->end;} - edit in meson.build at line 30
'vertex.c', - edit in hash.c at line 38
/* Return 1 if hashes are equal, 0 otherwise */ - edit in change.c at line 568
struct vertex *vto = NULL; - replacement in change.c at line 590
// FIXME: need to keep track of current! see// /home/t/sources/pijul/pijul/libpijul/src/changestore/filesystem.rs (get_contents_ext)size_t z = edge->to.end - edge->to.start;/* TODO loop over the edges, extract relevant contents from the changestore */// keep track of current vertexif (vto && vertexeq(&edge->to, vto))continue;vto = &edge->to;size_t z = vto->end - vto->start; - replacement in change.c at line 595
ch = changestoreget(changes, &edge->to.change);/* printf("changestoreget("); *//* hashprint(&edge->to.change); *//* printf(")"); *//* printf(" - %s\n", ch ? "ok" : "fail :-("); */ch = changestoreget(changes, &vto->change); - replacement in change.c at line 602
if (buf) {if (buf) - replacement in change.c at line 606
} else {else - replacement in change.c at line 608
}memcpy(&buf[sz], &ch->contents[edge->to.start],z);memcpy(&buf[sz], &ch->contents[vto->start], z); - replacement in change.c at line 714
if (res)if (res) { - edit in change.c at line 716
free(res);} - edit in Makefile at line 53[14.82][2.13]
check2: buildbuild/ani change YM2LC6QP2D7TK3JUKOXWUWTQEGMCEGQDGPTOZPWC3BRDFNRKSZWQC # this one has file additions