summaryrefslogtreecommitdiffstats
path: root/diffcore-delta.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--diffcore-delta.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/diffcore-delta.c b/diffcore-delta.c
index c30b56e..ba6cbee 100644
--- a/diffcore-delta.c
+++ b/diffcore-delta.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "diff.h"
#include "diffcore.h"
/*
@@ -159,6 +158,10 @@ static struct spanhash_top *hash_chars(struct repository *r,
n = 0;
accum1 = accum2 = 0;
}
+ if (n > 0) {
+ hashval = (accum1 + accum2 * 0x61) % HASHBASE;
+ hash = add_spanhash(hash, hashval, n);
+ }
QSORT(hash->data, (size_t)1ul << hash->alloc_log2, spanhash_cmp);
return hash;
}