t: add a test for fetching from alternate repositories
Until recently, gitobj did not understand how to read from alternate repositories. This caused us to think objects not in the local repository were missing, and consequently, to cause the object scanner to exit early and a deadlock. Since both of these issue are now fixed, add a test that we can fetch from a shared repository without hangs or failures.
This commit is contained in:
parent
35e69a2d44
commit
ef0410e67c
18
t/t-fetch.sh
18
t/t-fetch.sh
@ -51,8 +51,9 @@ begin_test "init for fetch tests"
|
||||
git push origin newbranch
|
||||
assert_server_object "$reponame" "$b_oid"
|
||||
|
||||
# This clone is used for subsequent tests
|
||||
# These clones are used for subsequent tests
|
||||
clone_repo "$reponame" clone
|
||||
git clone --shared "$TRASHDIR/clone" "$TRASHDIR/shared"
|
||||
)
|
||||
end_test
|
||||
|
||||
@ -70,6 +71,21 @@ begin_test "fetch"
|
||||
)
|
||||
end_test
|
||||
|
||||
begin_test "fetch (shared repository)"
|
||||
(
|
||||
set -e
|
||||
cd shared
|
||||
rm -rf .git/lfs/objects
|
||||
|
||||
git lfs fetch 2>&1 | tee fetch.log
|
||||
! grep "Could not scan" fetch.log
|
||||
assert_local_object "$contents_oid" 1
|
||||
|
||||
git lfs fsck 2>&1 | tee fsck.log
|
||||
grep "Git LFS fsck OK" fsck.log
|
||||
)
|
||||
end_test
|
||||
|
||||
begin_test "fetch with remote"
|
||||
(
|
||||
set -e
|
||||
|
Loading…
Reference in New Issue
Block a user