Objects managed by an external ODB should not be put into pack files. They should be transfered using other mechanism that can be specific to the external odb. Signed-off-by: Christian Couder <chriscool@xxxxxxxxxxxxx> --- builtin/pack-objects.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index a57b4f058d..db5e225d5a 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -26,6 +26,7 @@ #include "argv-array.h" #include "mru.h" #include "packfile.h" +#include "external-odb.h" static const char *pack_usage[] = { N_("git pack-objects --stdout [<options>...] [< <ref-list> | < <object-list>]"), @@ -1012,6 +1013,9 @@ static int want_object_in_pack(const unsigned char *sha1, return want; } + if (external_odb_has_object(sha1)) + return 0; + for (entry = packed_git_mru->head; entry; entry = entry->next) { struct packed_git *p = entry->item; off_t offset; -- 2.14.1.576.g3f707d88cd