index: make the index file format extensible.
[gitweb.git] / pack-objects.c
index 09f4f2c944d95bb145823c0b07f4a7f302bcab1f..c0acc460bb9df0313e314eb2cf48363b2458082c 100644 (file)
@@ -1052,7 +1052,7 @@ static int try_delta(struct unpacked *cur, struct unpacked *old, unsigned max_de
        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)
@@ -1231,7 +1231,7 @@ static void setup_progress_signal(void)
 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;