tree-diff: remove the use of pathspec's raw[] in follow-rename codepath
[gitweb.git] / sha1_file.c
index 16f08d475cde5e96282aa830dd3373277c2b898f..0af19c00f19b56b23bd7d4ad0f27fdd45cd06d90 100644 (file)
@@ -2145,8 +2145,17 @@ void *unpack_entry(struct packed_git *p, off_t obj_offset,
                data = patch_delta(base, base_size,
                                   delta_data, delta_size,
                                   &size);
+
+               /*
+                * We could not apply the delta; warn the user, but keep going.
+                * Our failure will be noticed either in the next iteration of
+                * the loop, or if this is the final delta, in the caller when
+                * we return NULL. Those code paths will take care of making
+                * a more explicit warning and retrying with another copy of
+                * the object.
+                */
                if (!data)
-                       die("failed to apply delta");
+                       error("failed to apply delta");
 
                free(delta_data);
        }