On Fri, May 30, 2014 at 11:29:10AM +0100, Nix wrote:

> As 0232852b, but for the push tests instead: this avoids a start_httpd
> in the middle of the file, which fails under GIT_TEST_HTTPD=false.
> 
> Signed-off-by: Nick Alcock <nick.alc...@oracle.com>

Thanks, this makes sense. I'm really not sure why we didn't notice this
at the same time as t5537.

I'm cc-ing Duy, who wrote the original test, to give input on the new
test setup.

> ---
> On 30 May 2014, Jeff King said:
> > diff --git a/t/t5537-fetch-shallow.sh b/t/t5537-fetch-shallow.sh
> > index be951a4..a980574 100755
> > --- a/t/t5537-fetch-shallow.sh
> > +++ b/t/t5537-fetch-shallow.sh
> 
> btw, t5538-push-shallow.sh has the same bug but was not fixed up that I
> can see. (Though I can't see the original fix in the history of master
> either: was it squashed away somehow?)

I don't think so. As far as I can tell, it was never fixed.

> +test_description='push from/to a shallow clone over http'
> +
> +. ./test-lib.sh
> +
> +if test -n "$NO_CURL" -o -z "$GIT_TEST_HTTPD"; then
> +     say 'skipping test, git built without http support'
> +     test_done
> +fi

Ah, this may be why we missed it. We should leave the handling of
$GIT_TEST_HTTPD to lib-httpd.sh. I think the topic to refactor lib-httpd
setup and this shallow topic were developed in isolation, and we never
noticed the semantic conflict during the merge, because there's no
textual conflict.

So when I tested with a broken apache, we silently skipped this test
(but setting GIT_TEST_HTTPD=false does not trigger the above skip).

> +test_expect_success 'push from shallow repo via http' '
> +     mv "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" shallow-upstream.git &&
> +     git clone --bare --no-local full "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
> +     (
> +     cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
> +     git config http.receivepack true
> +     ) &&
> +     commit 1s0 &&

This is a typo, no? The original is just "commit 10".

With that fix, the test still fails:

    --- expect      2014-05-30 17:18:08.638496558 +0000
    +++ actual      2014-05-30 17:18:08.638496558 +0000
    @@ -1,5 +1,4 @@
     10
    -1
     4
     3
     2
    not ok 3 - push from shallow repo via http

I think we can just drop that "1" from the expected output, though. It
was created in the original by the "push from full to shallow" test (and
is rather confusing, anyway, as it shares a name with the original "1").

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to