[PATCH 20/40] external-odb: accept only blobs for now
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Jan 3, 2018, 16:33 UTC
- Message-ID
- <20180103163403.11303-21-chriscool@tuxfamily.org>
- In-Reply-To
- <20180103163403.11303-1-chriscool@tuxfamily.org>
The mechanism to decide which blobs should be sent to which external object database will be very simple for now. If the external odb helper support any "put_*" instruction all the new blobs will be sent to it.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> --- external-odb.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/external-odb.c b/external-odb.c index 337bdd2540..93971e9ce4 100644 --- a/external-odb.c +++ b/external-odb.c @@ -159,6 +159,10 @@ int external_odb_put_object(const void *buf, size_t len, external_odb_init(); + /* For now accept only blobs */ + if (strcmp(type, "blob")) + return 1; + for (o = helpers; o; o = o->next) { int r = odb_helper_put_object(o, buf, len, type, sha1); if (r <= 0)
-- 2.16.0.rc0.16.g82191dbc6c.dirty