summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-09-08 14:22:39 +0700
committerNicolas Pitre <nico@fluxnic.net>2013-09-13 21:00:28 -0400
commita1541a3e9676a5ff2a192b3b1c58b17a660675ed (patch)
tree55dec235ae1412ff720ddcf7b83ee14027f6b218
parent8ba6d1fc9fdc7fa8072b6385fe87916398f4b769 (diff)
downloadgit-a1541a3e9676a5ff2a192b3b1c58b17a660675ed.tar.gz
index-pack: skip looking for ofs-deltas in v4 as they are not allowed
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
-rw-r--r--builtin/index-pack.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 5f04809de4..ecd721cbd2 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -1173,10 +1173,13 @@ static struct base_data *find_unresolved_deltas_1(struct base_data *base,
find_delta_children(&base_spec,
&base->ref_first, &base->ref_last, OBJ_REF_DELTA);
- memset(&base_spec, 0, sizeof(base_spec));
- base_spec.offset = base->obj->idx.offset;
- find_delta_children(&base_spec,
- &base->ofs_first, &base->ofs_last, OBJ_OFS_DELTA);
+ if (!packv4) {
+ memset(&base_spec, 0, sizeof(base_spec));
+ base_spec.offset = base->obj->idx.offset;
+ find_delta_children(&base_spec,
+ &base->ofs_first, &base->ofs_last,
+ OBJ_OFS_DELTA);
+ }
if (base->ref_last == -1 && base->ofs_last == -1) {
free(base->data);