Commit Diff


commit - 5972d1ed77d4588ac24dca6fd010d64d0fd20aa9
commit + ce83301270cf9f69214b3b110149d9a3061540c3
blob - 7a9c336d77eb95e144f6d99eed2c9a27b1c17612
blob + 0dfeeba536b3ece8e4699ac23af23fedea41824e
--- lib/pack.c
+++ lib/pack.c
@@ -1490,6 +1490,24 @@ got_pack_dump_delta_chain_to_file(size_t *result_size,
 			n++;
 			if (base_buf == NULL)
 				rewind(base_file);
+			else if (pack->delta_cache && fulltext == NULL) {
+				err = got_delta_cache_add(pack->delta_cache,
+				    delta_data_offset, NULL, 0);
+				if (err) {
+					if (err->code != GOT_ERR_NO_SPACE)
+						goto done;
+					err = NULL;
+				} else {
+					err = got_delta_cache_add_fulltext(
+					    pack->delta_cache,
+					    delta_data_offset,
+					    base_buf, base_bufsz);
+					if (err &&
+					    err->code != GOT_ERR_NO_SPACE)
+						goto done;
+					err = NULL;
+				}
+			}
 			continue;
 		}