diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-09-05 14:40:58 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-09-05 14:40:58 -0700 |
commit | 2ea3df68e881405940596b8c299921f681f8c22c (patch) | |
tree | 55a5973fe24539164e49fde425af6590822e5e6b /t | |
parent | Merge branch 'hv/config-from-blob' into maint (diff) | |
parent | fetch-pack: do not remove .git/shallow file when --depth is not specified (diff) | |
download | tgif-2ea3df68e881405940596b8c299921f681f8c22c.tar.xz |
Merge branch 'nd/fetch-pack-shallow-fix' into maint
The recent "short-cut clone connectivity check" topic broke a shallow
repository when a fetch operation tries to auto-follow tags.
* nd/fetch-pack-shallow-fix:
fetch-pack: do not remove .git/shallow file when --depth is not specified
Diffstat (limited to 't')
-rwxr-xr-x | t/t5500-fetch-pack.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh index fd2598e601..a80584ea0e 100755 --- a/t/t5500-fetch-pack.sh +++ b/t/t5500-fetch-pack.sh @@ -505,4 +505,20 @@ test_expect_success 'test --all, --depth, and explicit tag' ' ) >out-adt 2>error-adt ' +test_expect_success 'shallow fetch with tags does not break the repository' ' + mkdir repo1 && + ( + cd repo1 && + git init && + test_commit 1 && + test_commit 2 && + test_commit 3 && + mkdir repo2 && + cd repo2 && + git init && + git fetch --depth=2 ../.git master:branch && + git fsck + ) +' + test_done |