summaryrefslogtreecommitdiff
path: root/builtin-pack-objects.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-08-30 20:31:39 -0700
committerJunio C Hamano <gitster@pobox.com>2008-08-30 20:31:39 -0700
commit7df437e56b5a2c5ec7140dd097b517563db4972c (patch)
treea006f20b481d811ccb4846534ef6394be5bc78a8 /builtin-pack-objects.c
parentff1e8bfcd69e5e0ee1a3167e80ef75b611f72123 (diff)
parentbbb896d8e10f736bfda8f587c0009c358c9a8599 (diff)
downloadgit-7df437e56b5a2c5ec7140dd097b517563db4972c.tar.gz
Merge branch 'maint'
* maint: gitattributes: -crlf is not binary git-apply: Loosen "match_beginning" logic Fix example in git-name-rev documentation shell: do not play duplicated definition games to shrink the executable Fix use of hardlinks in "make install" pack-objects: Allow missing base objects when creating thin packs
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r--builtin-pack-objects.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index d394c494a5..ef3befe57b 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -1095,9 +1095,12 @@ static void check_object(struct object_entry *entry)
}
entry->type = sha1_object_info(entry->idx.sha1, &entry->size);
- if (entry->type < 0)
- die("unable to get type of object %s",
- sha1_to_hex(entry->idx.sha1));
+ /*
+ * The error condition is checked in prepare_pack(). This is
+ * to permit a missing preferred base object to be ignored
+ * as a preferred base. Doing so can result in a larger
+ * pack file, but the transfer will still take place.
+ */
}
static int pack_offset_sort(const void *_a, const void *_b)
@@ -1721,8 +1724,12 @@ static void prepare_pack(int window, int depth)
if (entry->no_try_delta)
continue;
- if (!entry->preferred_base)
+ if (!entry->preferred_base) {
nr_deltas++;
+ if (entry->type < 0)
+ die("unable to get type of object %s",
+ sha1_to_hex(entry->idx.sha1));
+ }
delta_list[n++] = entry;
}