diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-11-15 01:26:04 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-15 01:26:04 +0300 |
commit | f5f6cb87defc4b7e8ba6cc6e82f616bef47ea6b0 (patch) | |
tree | cfa0daa0b019e83aba1d15ae5d8a4359da578a0e /t | |
parent | b2e163272c01aca4aee4684f5c683ba341c1953d (diff) | |
parent | 4191c35671f6392173221bea3994f8b305f4f3a8 (diff) |
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 b4760f2dc0..16eadd6b68 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 |