git-branch -D: make it work even when on a yet-to-be-born branch
[gitweb.git] / builtin-pack-objects.c
index 69e5dd39ca6f007d016ca562454cdb75ec9362fb..753bcd57b0084e7d3fa748f6a0fcef37a2ae8f3b 100644 (file)
@@ -1176,7 +1176,9 @@ static int try_delta(struct unpacked *trg, struct unpacked *src,
         * on an earlier try, but only when reusing delta data.
         */
        if (!no_reuse_delta && trg_entry->in_pack &&
-           trg_entry->in_pack == src_entry->in_pack)
+           trg_entry->in_pack == src_entry->in_pack &&
+           trg_entry->in_pack_type != OBJ_REF_DELTA &&
+           trg_entry->in_pack_type != OBJ_OFS_DELTA)
                return 0;
 
        /*