summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 01af249)
raw | patch | inline | side by side (parent: 01af249)
author | Brandon Casey <drafnel@gmail.com> | |
Mon, 10 Nov 2008 05:59:56 +0000 (23:59 -0600) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 12 Nov 2008 18:29:22 +0000 (10:29 -0800) |
Loose objects residing in an alternate object database should not be packed
when the -l option to repack is used.
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
when the -l option to repack is used.
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7700-repack.sh | patch | blob | history |
diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh
index 356afe371b3b04d12083a6d38ab74bf272862e05..43c9cf9139c91315ec5324667edfa958053af6cb 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' '
+ mkdir alt_objects &&
+ echo `pwd`/alt_objects > .git/objects/info/alternates &&
+ echo content3 > file3 &&
+ objsha1=$(GIT_OBJECT_DIRECTORY=alt_objects git hash-object -w file3) &&
+ git add file3 &&
+ git commit -m commit_file3 &&
+ git repack -a -d -l &&
+ git prune-packed &&
+ for p in .git/objects/pack/*.idx; do
+ if git verify-pack -v $p | egrep "^$objsha1"; then
+ found_duplicate_object=1
+ echo "DUPLICATE OBJECT FOUND"
+ break
+ fi
+ done &&
+ test -z "$found_duplicate_object"
+'
+
test_done