Re: [PATCH 6/6] fetch-pack: fix deepen shallow over smart http with no-done cap
On Thu, Feb 6, 2014 at 10:10 AM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
Show 10 quoted lines
> diff --git a/t/t5537-fetch-shallow.sh b/t/t5537-fetch-shallow.sh
> index b0fa738..fb11073 100755
> --- a/t/t5537-fetch-shallow.sh
> +++ b/t/t5537-fetch-shallow.sh
> @@ -200,5 +200,29 @@ EOF
> )
> '
>
> +# This test is tricky. We need large enough "have"s that fetch-pack
> +# will put pkt-flush in between. Then we need a "have" the the server
Show 5 quoted lines
> +# does not have, it'll send "ACK %s ready"
> +test_expect_success 'add more commits' '
> + (
> + cd shallow &&
> + for i in $(seq 10); do
Do you want to use test_seq here?
Show 21 quoted lines
> + git checkout --orphan unrelated$i &&
> + test_commit unrelated$i >/dev/null &&
> + git push -q "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" refs/heads/unrelated$i:refs/heads/unrelated$i
> + git push -q ../clone/.git refs/heads/unrelated$i:refs/heads/unrelated$i
> + done &&
> + git checkout master &&
> + test_commit new &&
> + git push "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" master
> + ) &&
> + (
> + cd clone &&
> + git checkout --orphan newnew &&
> + test_commit new-too &&
> + git fetch --depth=2
> + )
> +'
> +
> stop_httpd
> test_done
> --
> 1.8.5.2.240.g8478abd