Merge branch 'lt/rev-list' into next
[git.git] / pack-objects.c
index dd40a03..21ee572 100644 (file)
@@ -99,7 +99,7 @@ static int reused_delta = 0;
 
 static int pack_revindex_ix(struct packed_git *p)
 {
-       unsigned int ui = (unsigned int) p;
+       unsigned long ui = (unsigned long)(long)p;
        int i;
 
        ui = ui ^ (ui >> 16); /* defeat structure alignment */
@@ -768,7 +768,7 @@ static int sha1_sort(const struct object_entry *a, const struct object_entry *b)
        return memcmp(a->sha1, b->sha1, 20);
 }
 
-static struct object_entry **create_final_object_list()
+static struct object_entry **create_final_object_list(void)
 {
        struct object_entry **list;
        int i, j;
@@ -851,11 +851,10 @@ static int try_delta(struct unpacked *cur, struct unpacked *old, unsigned max_de
        }
 
        size = cur_entry->size;
-       if (size < 50)
-               return -1;
        oldsize = old_entry->size;
        sizediff = oldsize > size ? oldsize - size : size - oldsize;
-       if (sizediff > size / 8)
+
+       if (size < 50)
                return -1;
        if (old_entry->depth >= max_depth)
                return 0;