summaryrefslogtreecommitdiff
path: root/t/t1450-fsck.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-01-30 08:50:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-01-31 03:23:22 (GMT)
commite15ef669437d8396e0a442719ed54eb1df38366a (patch)
tree0d5a7764413e64e5a55d37727b1a11f7822076c7 /t/t1450-fsck.sh
parent469e2ebf63cbf05455365aa3ed6d43acf6f4e496 (diff)
downloadgit-e15ef669437d8396e0a442719ed54eb1df38366a.zip
git-e15ef669437d8396e0a442719ed54eb1df38366a.tar.gz
git-e15ef669437d8396e0a442719ed54eb1df38366a.tar.bz2
fsck: check loose objects from alternate object stores by default
"git fsck" used to validate only loose objects that are local and nothing else by default. This is not just too little when a repository is borrowing objects from other object stores, but also caused the connectivity check to mistakenly declare loose objects borrowed from them to be missing. The rationale behind the default mode that validates only loose objects is because these objects are still young and more unlikely to have been pushed to other repositories yet. That holds for loose objects borrowed from alternate object stores as well. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1450-fsck.sh')
-rwxr-xr-xt/t1450-fsck.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh
index d3a17b4..4597af0 100755
--- a/t/t1450-fsck.sh
+++ b/t/t1450-fsck.sh
@@ -16,4 +16,16 @@ test_expect_success 'HEAD is part of refs' '
test 0 = $(git fsck | wc -l)
'
+test_expect_success 'loose objects borrowed from alternate are not missing' '
+ mkdir another &&
+ (
+ cd another &&
+ git init &&
+ echo ../../../.git/objects >.git/objects/info/alternates &&
+ test_commit C fileC one &&
+ git fsck >out &&
+ ! grep "missing blob" out
+ )
+'
+
test_done