aboutsummaryrefslogtreecommitdiffstats
path: root/commit.c
diff options
context:
space:
mode:
authorEzekiel Newren <ezekielnewren@gmail.com>2025-10-29 22:19:44 +0000
committerJunio C Hamano <gitster@pobox.com>2025-10-30 07:13:35 -0700
commit3b2417504588a9ddd9c591b6ff40666354db2caf (patch)
tree9fbb7b424fb76f6054af4209f889c3dfff66759c /commit.c
parentxdiff: use unambiguous types in xdl_hash_record() (diff)
downloadgit-3b2417504588a9ddd9c591b6ff40666354db2caf.tar.gz
git-3b2417504588a9ddd9c591b6ff40666354db2caf.zip
xdiff: split xrecord_t.ha into line_hash and minimal_perfect_hash
The ha field is serving two different purposes, which makes the code harder to read. At first glance it looks like many places assume there could never be hash collisions between lines of the two input files. In reality, line_hash is used together with xdl_recmatch() to ensure correct comparisons of lines, even when collisions occur. To make this clearer, the old ha field has been split: * line_hash: The straightforward hash of a line, requiring no additional context. * minimal_perfect_hash: Not a new concept, but now a separate field. It comes from the classifier's general-purpose hash table, which assigns each line a unique and minimal hash across the two files. Signed-off-by: Ezekiel Newren <ezekielnewren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions