diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-11-14 14:26:04 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-14 14:26:04 -0800 |
commit | f5f6cb87defc4b7e8ba6cc6e82f616bef47ea6b0 (patch) | |
tree | cfa0daa0b019e83aba1d15ae5d8a4359da578a0e /t | |
parent | b2e163272c01aca4aee4684f5c683ba341c1953d (diff) | |
parent | 4191c35671f6392173221bea3994f8b305f4f3a8 (diff) | |
download | git-f5f6cb87defc4b7e8ba6cc6e82f616bef47ea6b0.tar.gz git-f5f6cb87defc4b7e8ba6cc6e82f616bef47ea6b0.tar.xz |
Merge branch 'sp/fetch-fix'
* sp/fetch-fix:
git-fetch: avoid local fetching from alternate (again)
rev-list: Introduce --quiet to avoid /dev/null redirects
run-command: Support sending stderr to /dev/null
git-fetch: Always fetch tags if the object they reference exists
Diffstat (limited to 't')
-rwxr-xr-x | t/t5502-quickfetch.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/t/t5502-quickfetch.sh b/t/t5502-quickfetch.sh index b4760f2dc..16eadd6b6 100755 --- a/t/t5502-quickfetch.sh +++ b/t/t5502-quickfetch.sh @@ -86,4 +86,37 @@ test_expect_success 'quickfetch should not leave a corrupted repository' ' ' +test_expect_success 'quickfetch should not copy from alternate' ' + + ( + mkdir quickclone && + cd quickclone && + git init-db && + (cd ../.git/objects && pwd) >.git/objects/info/alternates && + git remote add origin .. && + git fetch -k -k + ) && + obj_cnt=$( ( + cd quickclone && + git count-objects | sed -e "s/ *objects,.*//" + ) ) && + pck_cnt=$( ( + cd quickclone && + git count-objects -v | sed -n -e "/packs:/{ + s/packs:// + p + q + }" + ) ) && + origin_master=$( ( + cd quickclone && + git rev-parse origin/master + ) ) && + echo "loose objects: $obj_cnt, packfiles: $pck_cnt" && + test $obj_cnt -eq 0 && + test $pck_cnt -eq 0 && + test z$origin_master = z$(git rev-parse master) + +' + test_done |