#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!
*
if (cur_entry->delta)
max_size = cur_entry->delta_size-1;
if (sizediff >= max_size)
- return -1;
+ return 0;
delta_buf = diff_delta(old->data, oldsize,
cur->data, size, &delta_size, max_size);
if (!delta_buf)
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;
}
int main(int argc, char **argv)
{
SHA_CTX ctx;
- char line[PATH_MAX + 20];
+ char line[40 + 1 + PATH_MAX + 2];
int window = 10, depth = 10, pack_to_stdout = 0;
struct object_entry **list;
int num_preferred_base = 0;