summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 171110a)
raw | patch | inline | side by side (parent: 171110a)
author | Brandon Casey <casey@nrlssc.navy.mil> | |
Fri, 20 Mar 2009 03:47:52 +0000 (22:47 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 20 Mar 2009 20:32:33 +0000 (13:32 -0700) |
These two features were invented for use by repack when repack will delete
the local packs that have been made redundant. The packs accessible
through alternates are not deleted by repack, so the objects contained in
them are still accessible after the local packs are deleted. They do not
need to be repacked into the new pack or loosened. For the case of
loosening they would immediately be deleted by the subsequent prune-packed
that is called by repack anyway.
This fixes the test
'packed unreachable obs in alternate ODB are not loosened' in t7700.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
the local packs that have been made redundant. The packs accessible
through alternates are not deleted by repack, so the objects contained in
them are still accessible after the local packs are deleted. They do not
need to be repacked into the new pack or loosened. For the case of
loosening they would immediately be deleted by the subsequent prune-packed
that is called by repack anyway.
This fixes the test
'packed unreachable obs in alternate ODB are not loosened' in t7700.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-pack-objects.c | patch | blob | history | |
t/t7700-repack.sh | patch | blob | history |
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index b2e46264ee432764a10c19f7624c8fe6d02a54e5..aae4d243b3c69a2206fb07006cc3691b2020052f 100644 (file)
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
const unsigned char *sha1;
struct object *o;
- if (p->pack_keep)
+ if (!p->pack_local || p->pack_keep)
continue;
if (open_pack_index(p))
die("cannot open pack index");
const unsigned char *sha1;
for (p = packed_git; p; p = p->next) {
- if (p->pack_keep)
+ if (!p->pack_local || p->pack_keep)
continue;
if (open_pack_index(p))
diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh
index adba8a1c65822c1c05045a0f22930757f6eaeadf..1ef3892f92b189706f1f99e875f196f8c4eb60ed 100755 (executable)
--- a/t/t7700-repack.sh
+++ b/t/t7700-repack.sh
done
'
-test_expect_failure 'packed unreachable obs in alternate ODB are not loosened' '
+test_expect_success 'packed unreachable obs in alternate ODB are not loosened' '
rm -f alt_objects/pack/*.keep &&
mv .git/objects/pack/* alt_objects/pack/ &&
csha1=$(git rev-parse HEAD^{commit}) &&