Commits


fix patience diff assertion failure exposed by test122


add a test case which triggers an assertion in diff -P


add another test case where a context line appears as both - and + This line appears as a context line with regular diff(1) and git diff: crd->crd_key = sd->mds.mdd_crypto.scr_key[0]; [[[ + crd->crd_alg = sd->mds.mdd_crypto.scr_alg; + crd->crd_klen = sd->mds.mdd_crypto.scr_klen; crd->crd_key = sd->mds.mdd_crypto.scr_key[0]; - bcopy(&blk, crd->crd_iv, sizeof(blk)); + memcpy(crd->crd_iv, &blkno, sizeof(blkno)); ]]] Our diff produces a different result where this context line is both deleted and added: [[[ - crd->crd_alg = CRYPTO_AES_XTS; + crd->crd_alg = sd->mds.mdd_crypto.scr_alg; + crd->crd_klen = sd->mds.mdd_crypto.scr_klen; + crd->crd_key = sd->mds.mdd_crypto.scr_key[0]; + memcpy(crd->crd_iv, &blkno, sizeof(blkno)); + } - switch (sd->mds.mdd_crypto.scr_meta->scm_alg) { - case SR_CRYPTOA_AES_XTS_128: - crd->crd_klen = 256; - break; - case SR_CRYPTOA_AES_XTS_256: - crd->crd_klen = 512; - break; - default: - goto unwind; - } - crd->crd_key = sd->mds.mdd_crypto.scr_key[0]; - bcopy(&blk, crd->crd_iv, sizeof(blk)); - } - crwu->cr_wu = wu; - crwu->cr_crp->crp_opaque = crwu; - return (crwu); ]]]


add some API functions which allow access to opaque struct diff_chunk


fix patience: off-by-one preventing swallow the same identical line twice


results_test: fix output: print atom indexes, not file pos


assertions fixup: unused var for non-debug


include sys/types.h for size_t in our string.h compat header file


remove a bunch of overly verbose debug


fix result chunks: add minus above plus failed to shift "empty" positions


add test020


undup code to add result chunks


add sanity assertions around adding result chunks uncovers errors related to placing minus chunks above already added plus chunks.


add strlcat and strlcpy compat functions for Linux


add test117


fix patience crash: iron out overlapping identical-blocks on the right


remove stray blank line


patience debug


patience comments


cosmetic: patience: use local var 'r' for right atom


cosmetic: rename local var from 'r' to 'rc'


debug fix in diff_data_init_subsection


debug: fix missing quote


debug init subsection


debug fix after changing result->left,right to pointers