summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 322bcd9)
raw | patch | inline | side by side (parent: 322bcd9)
author | Martin Koegler <mkoegler@auto.tuwien.ac.at> | |
Mon, 28 May 2007 21:20:57 +0000 (23:20 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 29 May 2007 08:24:42 +0000 (01:24 -0700) |
If builtin-pack-objects runs out of memory while finding
the best deltas, it bails out with an error.
If the delta index creation fails (because there is not enough memory),
we can downgrade the error message to a warning and continue with the
next object.
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <junkio@cox.net>
the best deltas, it bails out with an error.
If the delta index creation fails (because there is not enough memory),
we can downgrade the error message to a warning and continue with the
next object.
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-pack-objects.c | patch | blob | history |
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index e52332df99d4fc7c3d4643a682147a7397ebb568..17627b34e8316a2be64036727c86d9e02b9448d8 100644 (file)
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
}
if (!src->index) {
src->index = create_delta_index(src->data, src_size);
- if (!src->index)
- die("out of memory");
+ if (!src->index) {
+ static int warned = 0;
+ if (!warned++)
+ warning("suboptimal pack - out of memory");
+ return 0;
+ }
}
delta_buf = create_delta(src->index, trg->data, trg_size, &delta_size, max_size);