aboutsummaryrefslogtreecommitdiff
path: root/builtin-pack-objects.c
diff options
context:
space:
mode:
authorBrandon Casey <drafnel@gmail.com>2008-11-09 23:59:58 -0600
committerJunio C Hamano <gitster@pobox.com>2008-11-12 10:29:22 -0800
commitdaae06259556246959963947752bde4ee2df7b44 (patch)
tree173b309e6b071943447b676b9d0d7bd218b0bbf6 /builtin-pack-objects.c
parent0f4dc14ac4945448f7309964afeb879d20408e07 (diff)
downloadgit-daae06259556246959963947752bde4ee2df7b44.tar.gz
git-daae06259556246959963947752bde4ee2df7b44.tar.xz
pack-objects: extend --local to mean ignore non-local loose objects too
With this patch, --local means pack only local objects that are not already packed. Additionally, this fixes t7700 testing whether loose objects in an alternate object database are repacked. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r--builtin-pack-objects.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 29c00474d..85bd795d3 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -691,6 +691,9 @@ static int add_object_entry(const unsigned char *sha1, enum object_type type,
return 0;
}
+ if (!exclude && local && has_loose_object_nonlocal(sha1))
+ return 0;
+
for (p = packed_git; p; p = p->next) {
off_t offset = find_pack_entry_one(sha1, p);
if (offset) {