diffcore-delta.o log-tree.o
LIB_OBJS = \
- blob.o commit.o connect.o csum-file.o \
+ blob.o commit.o connect.o csum-file.o gsimm.o rabinpoly.o \
date.o diff-delta.o entry.o exec_cmd.o ident.o index.o \
object.o pack-check.o patch-delta.o path.o pkt-line.o \
quote.o read-cache.o refs.o run-command.o \
#include "pack.h"
#include "csum-file.h"
#include "tree-walk.h"
+#include "rabinpoly.h"
+#include "gsimm.h"
#include <sys/time.h>
#include <signal.h>
struct unpacked {
struct object_entry *entry;
+ unsigned char fingerprint[MD_LENGTH];
void *data;
};
if (old_entry->depth >= max_depth)
return 0;
+ if (gb_simm_score(cur->fingerprint, old->fingerprint) < 0.4)
+ return 0;
+
/*
* NOTE!
*
unsigned processed = 0;
unsigned last_percent = 999;
+ rabin_reset ();
memset(array, 0, array_size);
i = nr_objects;
idx = 0;
if (size != entry->size)
die("object %s inconsistent object length (%lu vs %lu)", sha1_to_hex(entry->sha1), size, entry->size);
+ gb_simm_process(n->data, size, n->fingerprint);
+
j = window;
while (--j > 0) {
unsigned int other_idx = idx + j;
m = array + other_idx;
if (!m->entry)
break;
+
if (try_delta(n, m, depth) < 0)
break;
}