From: Christian Couder Date: Mon, 19 Mar 2018 13:31:37 GMT Subject: [PATCH v2 26/36] pack-objects: don't pack objects in external odbs Message-ID: <20180319133147.15413-27-chriscool@tuxfamily.org> In-Reply-To: <20180319133147.15413-1-chriscool@tuxfamily.org> 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 --- builtin/pack-objects.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index e9d3cfb9e3..59e12151e8 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -28,6 +28,7 @@ #include "argv-array.h" #include "list.h" #include "packfile.h" +#include "external-odb.h" static const char *pack_usage[] = { N_("git pack-objects --stdout [...] [< | < ]"), @@ -1026,6 +1027,9 @@ static int want_object_in_pack(const struct object_id *oid, return want; } + if (external_odb_has_object(oid->hash)) + return 0; + list_for_each(pos, &packed_git_mru) { struct packed_git *p = list_entry(pos, struct packed_git, mru); off_t offset; -- 2.17.0.rc0.37.g8f476fabe9