Skip to content

Commit

Permalink
t5500: add test for fetching with an unknown 'shallow'
Browse files Browse the repository at this point in the history
When the client sends a 'shallow' line for an object that the server does
not have, the server should just ignore it and let the client keep that
unknown shallow boundary.

Signed-off-by: Michael Heemskerk <mheemskerk@atlassian.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Michael Heemskerk authored and Junio C Hamano committed May 2, 2013
1 parent af04fa2 commit 71d5f93
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions t/t5500-fetch-pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,20 @@ test_expect_success 'clone shallow with packed refs' '
test_cmp count8.expected count8.actual
'

test_expect_success 'fetch in shallow repo unreachable shallow objects' '
(
git clone --bare --branch B --single-branch "file://$(pwd)/." no-reflog &&
git clone --depth 1 "file://$(pwd)/no-reflog" shallow9 &&
cd no-reflog &&
git tag -d TAGB1 TAGB2 &&
git update-ref refs/heads/B B~~ &&
git gc --prune=now &&
cd ../shallow9 &&
git fetch origin &&
git fsck --no-dangling
)
'

test_expect_success 'setup tests for the --stdin parameter' '
for head in C D E F
do
Expand Down

0 comments on commit 71d5f93

Please sign in to comment.