Thread (55 messages) 55 messages, 5 authors, 2017-09-14
STALE3304d

Revision v5 of 3 in this series.

Revisions (3)
  1. v4 [diff vs current]
  2. v5 current
  3. v6 [diff vs current]

[PATCH v5 23/40] pack-objects: don't pack objects in external odbs

From: Christian Couder <hidden>
Date: 2017-08-03 09:21:47
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 builtin/pack-objects.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index f4a8441fe9..8283d15408 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -25,6 +25,7 @@
 #include "sha1-array.h"
 #include "argv-array.h"
 #include "mru.h"
+#include "external-odb.h"
 
 static const char *pack_usage[] = {
 	N_("git pack-objects --stdout [<options>...] [< <ref-list> | < <object-list>]"),
@@ -1011,6 +1012,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.0.rc1.52.gf02fb0ddac.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help