diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-10-23 13:32:17 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-10-23 13:32:17 -0700 |
commit | 6ba0d9551a2963a6fed83b90b55a373d79ef46d0 (patch) | |
tree | 528a196ba43fa7a9d519e2a2a2864a64ebd25091 /t | |
parent | git-merge: document the -S option (diff) | |
parent | Add testcase for needless objects during a shallow fetch (diff) | |
download | tgif-6ba0d9551a2963a6fed83b90b55a373d79ef46d0.tar.xz |
Merge branch 'nd/fetch-into-shallow' into maint
When there is no sufficient overlap between old and new history
during a "git fetch" into a shallow repository, objects that the
sending side knows the receiving end has were unnecessarily sent.
* 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')
-rwxr-xr-x | t/t5500-fetch-pack.sh | 11 | ||||
-rwxr-xr-x | t/t5530-upload-pack-error.sh | 3 |
2 files changed, 11 insertions, 3 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 diff --git a/t/t5530-upload-pack-error.sh b/t/t5530-upload-pack-error.sh index c983d3694c..3932e797f7 100755 --- a/t/t5530-upload-pack-error.sh +++ b/t/t5530-upload-pack-error.sh @@ -54,9 +54,6 @@ test_expect_success 'upload-pack fails due to error in rev-list' ' printf "0032want %s\n0034shallow %s00000009done\n0000" \ $(git rev-parse HEAD) $(git rev-parse HEAD^) >input && test_must_fail git upload-pack . <input >/dev/null 2>output.err && - # pack-objects survived - grep "Total.*, reused" output.err && - # but there was an error, which must have been in rev-list grep "bad tree object" output.err ' |