diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-09-20 23:25:32 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-09-20 23:25:32 +0400 |
commit | 238504b014230d0bc244fb0de84990863fcddd59 (patch) | |
tree | 59fee63d5862631a00b91a9e7045fa5935430dd2 /t/t5500-fetch-pack.sh | |
parent | 79e46c9fed837c565eac8d81448641d6b944a928 (diff) | |
parent | f21d2a786b7fa6e53bb09e6466185b26f7f30d98 (diff) |
Merge branch 'nd/fetch-into-shallow'
When there is no sufficient overlap between old and new history
during a fetch into a shallow repository, we unnecessarily sent
objects the sending side knows the receiving end has.
* nd/fetch-into-shallow:
Add testcase for needless objects during a shallow fetch
list-objects: mark more commits as edges in mark_edges_uninteresting
list-objects: reduce one argument in mark_edges_uninteresting
upload-pack: delegate rev walking in shallow fetch to pack-objects
shallow: add setup_temporary_shallow()
shallow: only add shallow graft points to new shallow file
move setup_alternate_shallow and write_shallow_commits to shallow.c
Diffstat (limited to 't/t5500-fetch-pack.sh')
-rwxr-xr-x | t/t5500-fetch-pack.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh index a80584ea0e..d87ddf73b7 100755 --- a/t/t5500-fetch-pack.sh +++ b/t/t5500-fetch-pack.sh @@ -393,6 +393,17 @@ test_expect_success 'fetch in shallow repo unreachable shallow objects' ' git fsck --no-dangling ) ' +test_expect_success 'fetch creating new shallow root' ' + ( + git clone "file://$(pwd)/." shallow10 && + git commit --allow-empty -m empty && + cd shallow10 && + git fetch --depth=1 --progress 2>actual && + # This should fetch only the empty commit, no tree or + # blob objects + grep "remote: Total 1" actual + ) +' test_expect_success 'setup tests for the --stdin parameter' ' for head in C D E F |