summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0f4dc14)
raw | patch | inline | side by side (parent: 0f4dc14)
author | Brandon Casey <drafnel@gmail.com> | |
Mon, 10 Nov 2008 05:59:58 +0000 (23:59 -0600) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 12 Nov 2008 18:29:22 +0000 (10:29 -0800) |
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>
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>
Documentation/git-pack-objects.txt | patch | blob | history | |
builtin-pack-objects.c | patch | blob | history | |
t/t7700-repack.sh | patch | blob | history |
index f9fac2ccf914a186b156027d08979d11415b1f9b..7d4c1a75562de80aa80dfbfa665330b14ec948c6 100644 (file)
--local::
This flag is similar to `--incremental`; instead of
ignoring all packed objects, it only ignores objects
- that are packed and not in the local object store
+ that are packed and/or not in the local object store
(i.e. borrowed from an alternate).
--non-empty::
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 29c00474d67897e0117301f504f02660333e5919..85bd795d3b811aaba42aa1165c30137b8a6105e8 100644 (file)
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
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) {
diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh
index 43c9cf9139c91315ec5324667edfa958053af6cb..960bff47fafa846299bdd2d3dffcc30616bd0017 100755 (executable)
--- a/t/t7700-repack.sh
+++ b/t/t7700-repack.sh
test -z "$found_duplicate_object"
'
-test_expect_failure 'loose objects in alternate ODB are not repacked' '
+test_expect_success 'loose objects in alternate ODB are not repacked' '
mkdir alt_objects &&
echo `pwd`/alt_objects > .git/objects/info/alternates &&
echo content3 > file3 &&