Re: [PATCH 00/10] Xdiff cleanup part 3
- From
Yee Cheng Chin <ychin.git@gmail.com>
- Date
- Jan 4, 2026, 06:01 UTC
- Message-ID
- <CAHTeOx_saiv_ftwS9fo8jLJS6VZyWufNzX4Rzbgaa8NmRJS8EQ@mail.gmail.com>
- In-Reply-To
- <pull.2156.git.git.1767379944.gitgitgadget@gmail.com>
Hi Ezekiel, I wonder if you saw my proposed patch "xdiff: fix outdated xpatience comments referring to "ha" member var"? (https://lore.kernel.org/pull.2139.git.git.1766464905719.gitgitgadget@gmail.com) from 2 weeks ago? It simply cleans up a stale comment after a previous xdiff cleanup when the "ha" member variable was split. I don't think it conflicts with this part 3 (it's a small comments clean up) but I wonder if you could take a look? Just to avoid future conflicts.
On Fri, Jan 2, 2026 at 10:52 AM Ezekiel Newren via GitGitGadget <gitgitgadget@gmail.com> wrote:
Show 69 quoted lines
>
> Patch series summary:
>
> * patch 1: Introduce the ivec type
> * patch 2: Create the function xdl_do_classic_diff()
> * patches 3-4: generic cleanup
> * patches 5-8: convert from dstart/dend (in xdfile_t) to
> delta_start/delta_end (in xdfenv_t)
> * patches 9-10: move xdl_cleanup_records(), and related, from xprepare.c to
> xdiffi.c
>
> Things that will be addressed in future patch series:
>
> * Make xdl_cleanup_records() easier to read
> * convert recs/nrec into an ivec
> * convert changed to an ivec
> * remove reference_index/nreff from xdfile_t and turn it into an ivec
> * splitting minimal_perfect_hash out as its own ivec
> * improve the performance of the classifier and parsing/hashing lines
>
> === before this patch series typedef struct s_xdfile { xrecord_t *recs;
> size_t nrec; ptrdiff_t dstart, dend; bool *changed; size_t *reference_index;
> size_t nreff; } xdfile_t;
>
> typedef struct s_xdfenv { xdfile_t xdf1, xdf2; } xdfenv_t;
>
> === after this patch series typedef struct s_xdfile { xrecord_t *recs;
> size_t nrec; bool *changed; size_t *reference_index; size_t nreff; }
> xdfile_t;
>
> typedef struct s_xdfenv { xdfile_t xdf1, xdf2; size_t delta_start,
> delta_end; size_t mph_size; } xdfenv_t;
>
> Ezekiel Newren (10):
> ivec: introduce the C side of ivec
> xdiff: make classic diff explicit by creating xdl_do_classic_diff()
> xdiff: don't waste time guessing the number of lines
> xdiff: let patience and histogram benefit from xdl_trim_ends()
> xdiff: use xdfenv_t in xdl_trim_ends() and xdl_cleanup_records()
> xdiff: cleanup xdl_trim_ends()
> xdiff: replace xdfile_t.dstart with xdfenv_t.delta_start
> xdiff: replace xdfile_t.dend with xdfenv_t.delta_end
> xdiff: remove dependence on xdlclassifier from xdl_cleanup_records()
> xdiff: move xdl_cleanup_records() from xprepare.c to xdiffi.c
>
> Makefile | 1 +
> compat/ivec.c | 113 ++++++++++++++++++
> compat/ivec.h | 52 +++++++++
> meson.build | 1 +
> xdiff/xdiffi.c | 221 +++++++++++++++++++++++++++++++++---
> xdiff/xdiffi.h | 1 +
> xdiff/xhistogram.c | 7 +-
> xdiff/xpatience.c | 7 +-
> xdiff/xprepare.c | 277 ++++++++-------------------------------------
> xdiff/xtypes.h | 3 +-
> xdiff/xutils.c | 20 ----
> xdiff/xutils.h | 1 -
> 12 files changed, 432 insertions(+), 272 deletions(-)
> create mode 100644 compat/ivec.c
> create mode 100644 compat/ivec.h
>
>
> base-commit: 66ce5f8e8872f0183bb137911c52b07f1f242d13
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2156%2Fezekielnewren%2Fxdiff-cleanup-3-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2156/ezekielnewren/xdiff-cleanup-3-v1
> Pull-Request: https://github.com/git/git/pull/2156
> --
> gitgitgadget
>