{"thread":{"id":"36788","subject":"git 2.0.0 PROFILE=BUILD check-phase problems with ./t5561-http-backend.sh; GIT_TEST_HTTPD=false problems with t5537-fetch-shallow.sh","startedAt":"2014-05-29T22:44:37Z","lastAt":"2014-05-31T01:03:32Z","messageCount":12,"participants":["Nix","Jeff King","Junio C Hamano","Duy Nguyen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"242991","messageId":"87y4xk8asq.fsf@spindle.srvr.nix","threadId":"36788","inReplyTo":null,"subject":"git 2.0.0 PROFILE=BUILD check-phase problems with ./t5561-http-backend.sh; GIT_TEST_HTTPD=false problems with t5537-fetch-shallow.sh","fromName":"Nix","fromEmail":"nix@esperi.org.uk","sentAt":"2014-05-29T22:44:37Z","receivedAt":"2014-05-29T22:44:37Z","isPatch":false,"sender":{"key":"nix@esperi.org.uk","avatar":"https://avatars.githubusercontent.com/u/6503005?v=4"},"body":"I observe test failures with git 2.0.0 which are attributable to the\nchange to run network tests by default. I'm lumping them both together\ninto one report because I'm lazy and I've blown too much time on this\nalready.\n\nI've got Apache 2.2.24 on this box, and t5551-http-fetch-smart.sh fails\nin a peculiar fashion during the PROFILE=BUILD stage:\n\n--- exp 2014-05-29 22:42:50.221599297 +0000\n+++ act 2014-05-29 22:42:50.231598452 +0000\n@@ -12,10 +12,10 @@\n GET  /smart/repo.git/objects/info/http-alternates HTTP/1.1 200 -\n GET  /smart/repo.git/objects/41/57d6f47fc8b7cb455fbf6f18d6f47fed49a6a5 HTTP/1.1 200\n GET  /smart/repo.git/objects/pack/pack-2cb3186872e8768852fcb6b22cdf2182e12f7490.pack HTTP/1.1 200\n-GET  /smart/repo.git/objects/pack/pack-2cb3186872e8768852fcb6b22cdf2182e12f7490.idx HTTP/1.1 200\n\n ###  no git-daemon-export-ok\n ###\n+GET  /smart/repo.git/objects/pack/pack-2cb3186872e8768852fcb6b22cdf2182e12f7490.idx HTTP/1.1 200\n GET  /smart_noexport/repo.git/HEAD HTTP/1.1 404 -\n GET  /smart_noexport/repo.git/info/refs HTTP/1.1 404 -\n GET  /smart_noexport/repo.git/objects/info/packs HTTP/1.1 404 -\n@@ -34,10 +34,10 @@\n GET  /smart_noexport/repo.git/objects/info/http-alternates HTTP/1.1 200 -\n GET  /smart_noexport/repo.git/objects/41/57d6f47fc8b7cb455fbf6f18d6f47fed49a6a5 HTTP/1.1 200\n GET  /smart_noexport/repo.git/objects/pack/pack-2cb3186872e8768852fcb6b22cdf2182e12f7490.pack HTTP/1.1 200\n-GET  /smart_noexport/repo.git/objects/pack/pack-2cb3186872e8768852fcb6b22cdf2182e12f7490.idx HTTP/1.1 200\n\n ###  getanyfile true\n ###\n+GET  /smart_noexport/repo.git/objects/pack/pack-2cb3186872e8768852fcb6b22cdf2182e12f7490.idx HTTP/1.1 200\n GET  /smart/repo.git/HEAD HTTP/1.1 200\n GET  /smart/repo.git/info/refs HTTP/1.1 200\n GET  /smart/repo.git/objects/info/packs HTTP/1.1 200\n@@ -45,10 +45,10 @@\n GET  /smart/repo.git/objects/info/http-alternates HTTP/1.1 200 -\n GET  /smart/repo.git/objects/41/57d6f47fc8b7cb455fbf6f18d6f47fed49a6a5 HTTP/1.1 200\n GET  /smart/repo.git/objects/pack/pack-2cb3186872e8768852fcb6b22cdf2182e12f7490.pack HTTP/1.1 200\n-GET  /smart/repo.git/objects/pack/pack-2cb3186872e8768852fcb6b22cdf2182e12f7490.idx HTTP/1.1 200\n\n ###  getanyfile false\n ###\n+GET  /smart/repo.git/objects/pack/pack-2cb3186872e8768852fcb6b22cdf2182e12f7490.idx HTTP/1.1 200\n GET  /smart/repo.git/HEAD HTTP/1.1 403 -\n GET  /smart/repo.git/info/refs HTTP/1.1 403 -\n GET  /smart/repo.git/objects/info/packs HTTP/1.1 403 -\nnot ok 14 - server request log matches test results\n#\n#               sed -e \"\n#                       s/^.* \\\"//\n#                       s/\\\"//\n#                       s/ [1-9][0-9]*\\$//\n#                       s/^GET /GET  /\n#               \" >act <\"$HTTPD_ROOT_PATH\"/access.log &&\n#               test_cmp exp act\n#\n\n# failed 1 among 14 test(s)\n\nIt appears that the Apache daemon is writing to the log slowly enough\nthat its log lines only get there after the testsuite has written its\nseparator, so a bunch of log lines appear to be attached to the wrong\ntest, and the comparison fails.\n\nCuriously, I can't make this happen in a conventional 'make check', even\nthough the only relevant components would seem to be bash and httpd: if\nanything, you'd expect the gcovvery to slow down git and thus make it\n*more* likely that any race between httpd log syncing and testsuite\nframework output to the same logfile would be hit...\n\nAttempting to work around this by building with GIT_TEST_HTTPD=false\ndoesn't work either:\n\n*** t5537-fetch-shallow.sh ***\nok 1 - setup\nok 2 - setup shallow clone\nok 3 - clone from shallow clone\nok 4 - fetch from shallow clone\nok 5 - fetch --depth from shallow clone\nok 6 - fetch --unshallow from shallow clone\nok 7 - fetch something upstream has but hidden by clients shallow boundaries\nok 8 - fetch that requires changes in .git/shallow is filtered\nok 9 - fetch --update-shallow\nerror: Can't use skip_all after running some tests\nMakefile:43: recipe for target 't5537-fetch-shallow.sh' failed\nmake[3]: *** [t5537-fetch-shallow.sh] Error 1\n\nsince this is trying to run the httpd halfway through the test, which\nwill never work if it's skipping it. Moving the httpd sourcing to the\ntop of the test isn't going to work either, because that would skip\n*everything*, when we want to skip only the httpd bits. Maybe splitting\nthe httpd bits into a separate test is best here? I'm not sure.\n\n-- \nNULL && (void)\n"},{"id":"242997","messageId":"20140530010649.GD28683@sigill.intra.peff.net","threadId":"36788","inReplyTo":"87y4xk8asq.fsf@spindle.srvr.nix","subject":"Re: git 2.0.0 PROFILE=BUILD check-phase problems with ./t5561-http-backend.sh; GIT_TEST_HTTPD=false problems with t5537-fetch-shallow.sh","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-05-30T01:06:49Z","receivedAt":"2014-05-30T01:06:49Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, May 29, 2014 at 11:44:37PM +0100, Nix wrote:\n\n> I observe test failures with git 2.0.0 which are attributable to the\n> change to run network tests by default. I'm lumping them both together\n> into one report because I'm lazy and I've blown too much time on this\n> already.\n\nWeird. I also see a strange failure on t5310 when building with\nPROFILE=BUILD. We get a segfault when reading jgit-produced bitmaps.\nTracking it down, we're getting inexplicably bogus data from an mmap'd\nfile (!). Compiling without PROFILE=BUILD, the test passes fine (even\nwith valgrind).\n\nIf I instrument it like this:\n\ndiff --git a/ewah/ewah_io.c b/ewah/ewah_io.c\nindex f7f700e..8cafacf 100644\n--- a/ewah/ewah_io.c\n+++ b/ewah/ewah_io.c\n@@ -119,6 +119,7 @@ int ewah_read_mmap(struct ewah_bitmap *self, void *map, size_t len)\n \tptr += sizeof(uint32_t);\n \n \tself->buffer_size = self->alloc_size = get_be32(ptr);\n+\twarning(\"got buffer_size of %lu from %lu\", self->buffer_size, *(uint32_t *)ptr);\n \tptr += sizeof(uint32_t);\n \n \tself->buffer = ewah_realloc(self->buffer,\n\na regular test-run reads:\n\n  warning: got buffer_size of 2 from 33554432\n  warning: got buffer_size of 2 from 33554432\n  warning: got buffer_size of 3 from 50331648\n  warning: got buffer_size of 1 from 16777216\n  warning: got buffer_size of 2 from 33554432\n\nand a PROFILE=BUILD one reads:\n\n  warning: got buffer_size of 2 from 33554432\n  warning: got buffer_size of 2 from 33554432\n  warning: got buffer_size of 3 from 50331648\n  warning: got buffer_size of 1 from 16777216\n  warning: got buffer_size of 131072 from 512\n\nI'm willing to believe we're doing something weird that violates the C\nstandard there, but I really can't see it.\n\nAnyway, that's a side note to your problem...\n\n> It appears that the Apache daemon is writing to the log slowly enough\n> that its log lines only get there after the testsuite has written its\n> separator, so a bunch of log lines appear to be attached to the wrong\n> test, and the comparison fails.\n\nYeah, that looks to me like what is happening, too. If I put a 'sleep\n1' into log_div, it passes. I would think apache would write the log\nbefore serving the file, but perhaps not. And like you, I would expect\ngcov to make things slower, not faster. Could there be something in the\nenvironment that\n\nI'm not sure what the best fix is. We could check the logfiles after\neach test instead of at the end, but that will just end up with the same\nrace: we may check them before apache has written them.\n\n> Attempting to work around this by building with GIT_TEST_HTTPD=false\n> doesn't work either:\n> \n> *** t5537-fetch-shallow.sh ***\n> ok 1 - setup\n> ok 2 - setup shallow clone\n> ok 3 - clone from shallow clone\n> ok 4 - fetch from shallow clone\n> ok 5 - fetch --depth from shallow clone\n> ok 6 - fetch --unshallow from shallow clone\n> ok 7 - fetch something upstream has but hidden by clients shallow boundaries\n> ok 8 - fetch that requires changes in .git/shallow is filtered\n> ok 9 - fetch --update-shallow\n> error: Can't use skip_all after running some tests\n> Makefile:43: recipe for target 't5537-fetch-shallow.sh' failed\n> make[3]: *** [t5537-fetch-shallow.sh] Error 1\n\nHrm. This already came up, and we dealt with it in 0232852 (t5537: move\nhttp tests out to t5539, 2014-02-13). Which is in v2.0.0.\n\nBut somehow the code is back in v2.0.0 Presumably this is the result of a\nmis-merge. I'll send a patch.\n\n-Peff\n"},{"id":"242998","messageId":"20140530013419.GE28683@sigill.intra.peff.net","threadId":"36788","inReplyTo":"20140530010649.GD28683@sigill.intra.peff.net","subject":"[PATCH] t5537: re-drop http tests","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-05-30T01:34:19Z","receivedAt":"2014-05-30T01:34:19Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"These were originally removed by 0232852 (t5537: move\nhttp tests out to t5539, 2014-02-13). However, they were\naccidentally re-added in 1ddb4d7 (Merge branch\n'nd/upload-pack-shallow', 2014-03-21).\n\nThis looks like an error in manual conflict resolution.\nHere's what happened:\n\n  1. v1.9.0 shipped with the http tests in t5537.\n\n  2. We realized that this caused problems, and built\n     0232852 on top to move the tests to their own file.\n     This fix made it into v1.9.1.\n\n  3. We later had another fix in nd/upload-pack-shallow that\n     also touched t5537. It was built directly on v1.9.0.\n\nWhen we merged nd/upload-pack-shallow to master, we got a\nconflict; it was built on a version with the http tests, but\nwe had since removed them. The correct resolution was to\ndrop the http tests and keep the new ones, but instead we\nkept everything.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\nThis is a regression in running \"make test\" in v2.0.0 for people who do\nnot have apache installed, so it would be nice to hit maint for 2.0.1.\n\nI had a very hard time finding the merge to blame, because the\ncombined-diff code is convinced this isn't an interesting hunk (because\nwe kept no content from the other side, as there was none to keep!). I\neventually tracked it down with \"git log --first-parent -m t/t5537*\".\n\nAnd a final side note. If you retry the merge by:\n\n  m=1ddb4d7\n  git checkout $m^1\n  git merge $m^2\n\nyou can see the resulting conflict is quite tricky to understand. You\ncan tell from the blank \"ours\" side that _something_ was removed\n(otherwise there would not have been a conflict), but there is no way to\ntell what, or that the same something is part of the \"theirs\" side.\nViewing it with diff3 conflict-style makes it much more obvious.\n\n t/t5537-fetch-shallow.sh | 28 ----------------------------\n 1 file changed, 28 deletions(-)\n\ndiff --git a/t/t5537-fetch-shallow.sh b/t/t5537-fetch-shallow.sh\nindex be951a4..a980574 100755\n--- a/t/t5537-fetch-shallow.sh\n+++ b/t/t5537-fetch-shallow.sh\n@@ -173,33 +173,6 @@ EOF\n \t)\n '\n \n-if test -n \"$NO_CURL\" -o -z \"$GIT_TEST_HTTPD\"; then\n-\tsay 'skipping remaining tests, git built without http support'\n-\ttest_done\n-fi\n-\n-LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'5537'}\n-. \"$TEST_DIRECTORY\"/lib-httpd.sh\n-start_httpd\n-\n-test_expect_success 'clone http repository' '\n-\tgit clone --bare --no-local shallow \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit clone $HTTPD_URL/smart/repo.git clone &&\n-\t(\n-\tcd clone &&\n-\tgit fsck &&\n-\tgit log --format=%s origin/master >actual &&\n-\tcat <<EOF >expect &&\n-7\n-6\n-5\n-4\n-3\n-EOF\n-\ttest_cmp expect actual\n-\t)\n-'\n-\n test_expect_success POSIXPERM,SANITY 'shallow fetch from a read-only repo' '\n \tcp -R .git read-only.git &&\n \tfind read-only.git -print | xargs chmod -w &&\n@@ -213,5 +186,4 @@ EOF\n \ttest_cmp expect actual\n '\n \n-stop_httpd\n test_done\n-- \n2.0.0.rc1.436.g03cb729\n"},{"id":"243008","messageId":"87ppiv8vj8.fsf@spindle.srvr.nix","threadId":"36788","inReplyTo":"20140530010649.GD28683@sigill.intra.peff.net","subject":"Re: git 2.0.0 PROFILE=BUILD check-phase problems with ./t5561-http-backend.sh; GIT_TEST_HTTPD=false problems with t5537-fetch-shallow.sh","fromName":"Nix","fromEmail":"nix@esperi.org.uk","sentAt":"2014-05-30T09:28:59Z","receivedAt":"2014-05-30T09:28:59Z","isPatch":false,"sender":{"key":"nix@esperi.org.uk","avatar":"https://avatars.githubusercontent.com/u/6503005?v=4"},"body":"On 30 May 2014, Jeff King told this:\n\n> On Thu, May 29, 2014 at 11:44:37PM +0100, Nix wrote:\n>\n>> I observe test failures with git 2.0.0 which are attributable to the\n>> change to run network tests by default. I'm lumping them both together\n>> into one report because I'm lazy and I've blown too much time on this\n>> already.\n>\n> Weird. I also see a strange failure on t5310 when building with\n> PROFILE=BUILD. We get a segfault when reading jgit-produced bitmaps.\n\nI don't see that, but this may be a compiler difference, or\nenvironmental difference, or something.\n\n> Tracking it down, we're getting inexplicably bogus data from an mmap'd\n> file (!). Compiling without PROFILE=BUILD, the test passes fine (even\n> with valgrind).\n>\n> If I instrument it like this:\n>\n> diff --git a/ewah/ewah_io.c b/ewah/ewah_io.c\n> index f7f700e..8cafacf 100644\n> --- a/ewah/ewah_io.c\n> +++ b/ewah/ewah_io.c\n> @@ -119,6 +119,7 @@ int ewah_read_mmap(struct ewah_bitmap *self, void *map, size_t len)\n>  \tptr += sizeof(uint32_t);\n>  \n>  \tself->buffer_size = self->alloc_size = get_be32(ptr);\n> +\twarning(\"got buffer_size of %lu from %lu\", self->buffer_size, *(uint32_t *)ptr);\n>  \tptr += sizeof(uint32_t);\n>  \n>  \tself->buffer = ewah_realloc(self->buffer,\n>\n> a regular test-run reads:\n>\n>   warning: got buffer_size of 2 from 33554432\n>   warning: got buffer_size of 2 from 33554432\n>   warning: got buffer_size of 3 from 50331648\n>   warning: got buffer_size of 1 from 16777216\n>   warning: got buffer_size of 2 from 33554432\n>\n> and a PROFILE=BUILD one reads:\n>\n>   warning: got buffer_size of 2 from 33554432\n>   warning: got buffer_size of 2 from 33554432\n>   warning: got buffer_size of 3 from 50331648\n>   warning: got buffer_size of 1 from 16777216\n>   warning: got buffer_size of 131072 from 512\n>\n> I'm willing to believe we're doing something weird that violates the C\n> standard there, but I really can't see it.\n\nIt's doubly strange because you're not building with -flto at all, all\ncallers of ewah_read_mmap() are in a separate file, and there are no\nconditionals or loops above the warning() locus. Maybe the error is in a\ndifferent file, and is causing a nonsense 'len' to get passed in?\n\nBut I think this *may* be a false alarm. *(uint32_t *)ptr on a uint8_t\n(in your logging line) is an aliasing violation, and the nearly-\nuninitialized '512' is pretty much what I'd expect GCC to do now and\nthen, given that. Just a guess.\n\n(I'm surprised this doesn't cause a problem *always*, though.)\n\n>> It appears that the Apache daemon is writing to the log slowly enough\n>> that its log lines only get there after the testsuite has written its\n>> separator, so a bunch of log lines appear to be attached to the wrong\n>> test, and the comparison fails.\n>\n> Yeah, that looks to me like what is happening, too. If I put a 'sleep\n> 1' into log_div, it passes. I would think apache would write the log\n> before serving the file, but perhaps not.\n\nIt does a straight write() via APR, which should work, I'd have thought.\nThis is on a tmpfs, not a network filesystem or anything.\n\n(Aside: the flushing semantics are quite tangled, but shouldn't matter,\ngiven that we're just doing a write(). Apache calls apr_file_flush() on\nthe logfile, but that's just flushing apr's analogue of stdio buffers:\nit does nothing if the file is unbuffered -- and the error log file is\nunbuffered. It does not call apr_file_sync(), but you shouldn't need a\nsync() for one process to see another process's output.)\n\n>                                           And like you, I would expect\n> gcov to make things slower, not faster. Could there be something in the\n> environment that\n\nI'm more inclined to blame the kernel or the compiler, but I *always*\nblame the kernel or the compiler. :P\n\n> I'm not sure what the best fix is. We could check the logfiles after\n> each test instead of at the end, but that will just end up with the same\n> race: we may check them before apache has written them.\n\nYeah, that seems less than useful.\n\n-- \nNULL && (void)\n"},{"id":"243010","messageId":"87lhtj8sqx.fsf_-_@spindle.srvr.nix","threadId":"36788","inReplyTo":"20140530013419.GE28683@sigill.intra.peff.net","subject":"[RFC PATCH] t5538: move http push tests out to t5542","fromName":"Nix","fromEmail":"nix@esperi.org.uk","sentAt":"2014-05-30T10:29:10Z","receivedAt":"2014-05-30T10:29:10Z","isPatch":true,"sender":{"key":"nix@esperi.org.uk","avatar":"https://avatars.githubusercontent.com/u/6503005?v=4"},"body":"As 0232852b, but for the push tests instead: this avoids a start_httpd\nin the middle of the file, which fails under GIT_TEST_HTTPD=false.\n\nSigned-off-by: Nick Alcock <nick.alcock@oracle.com>\n---\nOn 30 May 2014, Jeff King said:\n> diff --git a/t/t5537-fetch-shallow.sh b/t/t5537-fetch-shallow.sh\n> index be951a4..a980574 100755\n> --- a/t/t5537-fetch-shallow.sh\n> +++ b/t/t5537-fetch-shallow.sh\n\nbtw, t5538-push-shallow.sh has the same bug but was not fixed up that I\ncan see. (Though I can't see the original fix in the history of master\neither: was it squashed away somehow?)\n\nThis new test fails if the patch is applied as-is because I haven't done\nany ref adjustment (I don't honestly know what results are expected, and\nthe actual results I'm seeing, with a ref named '1s0' intermittently\nreplacing either 1 or 10 and 1 both, are so bizarre and inconsistent\nthat I suspect I'm hitting another local config problem of some sort.)\n\nBut something like this is needed.\n\n(signed off with my work email address for paranoia's sake.)\n\n t/t5538-push-shallow.sh      |  59 -------------------------\n t/t5542-push-http-shallow.sh | 101 +++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 101 insertions(+), 59 deletions(-)\n create mode 100755 t/t5542-push-http-shallow.sh\n\ndiff --git a/t/t5538-push-shallow.sh b/t/t5538-push-shallow.sh\nindex 8e54ac5..ceee95b 100755\n--- a/t/t5538-push-shallow.sh\n+++ b/t/t5538-push-shallow.sh\n@@ -120,63 +120,4 @@ EOF\n \tgit cat-file blob `echo 1|git hash-object --stdin` >/dev/null\n \t)\n '\n-\n-if test -n \"$NO_CURL\" -o -z \"$GIT_TEST_HTTPD\"; then\n-\tsay 'skipping remaining tests, git built without http support'\n-\ttest_done\n-fi\n-\n-. \"$TEST_DIRECTORY\"/lib-httpd.sh\n-start_httpd\n-\n-test_expect_success 'push to shallow repo via http' '\n-\tgit clone --bare --no-local shallow \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\t(\n-\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit config http.receivepack true\n-\t) &&\n-\t(\n-\tcd full &&\n-\tcommit 9 &&\n-\tgit push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master\n-\t) &&\n-\t(\n-\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit fsck &&\n-\tgit log --format=%s top/master >actual &&\n-\tcat <<EOF >expect &&\n-9\n-4\n-3\n-EOF\n-\ttest_cmp expect actual\n-\t)\n-'\n-\n-test_expect_success 'push from shallow repo via http' '\n-\tmv \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" shallow-upstream.git &&\n-\tgit clone --bare --no-local full \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\t(\n-\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit config http.receivepack true\n-\t) &&\n-\tcommit 10 &&\n-\tgit push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master &&\n-\t(\n-\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit fsck &&\n-\tgit log --format=%s top/master >actual &&\n-\tcat <<EOF >expect &&\n-10\n-1\n-4\n-3\n-2\n-1\n-EOF\n-\ttest_cmp expect actual\n-\t)\n-'\n-\n-stop_httpd\n test_done\ndiff --git a/t/t5542-push-http-shallow.sh b/t/t5542-push-http-shallow.sh\nnew file mode 100755\nindex 0000000..61a7281\n--- /dev/null\n+++ b/t/t5542-push-http-shallow.sh\n@@ -0,0 +1,101 @@\n+#!/bin/sh\n+\n+test_description='push from/to a shallow clone over http'\n+\n+. ./test-lib.sh\n+\n+if test -n \"$NO_CURL\" -o -z \"$GIT_TEST_HTTPD\"; then\n+\tsay 'skipping test, git built without http support'\n+\ttest_done\n+fi\n+\n+. \"$TEST_DIRECTORY\"/lib-httpd.sh\n+start_httpd\n+\n+commit() {\n+\techo \"$1\" >tracked &&\n+\tgit add tracked &&\n+\tgit commit -m \"$1\"\n+}\n+\n+test_expect_success 'setup' '\n+\tgit config --global transfer.fsckObjects true &&\n+\tcommit 1 &&\n+\tcommit 2 &&\n+\tcommit 3 &&\n+\tcommit 4 &&\n+\tgit clone . full &&\n+\t(\n+\tgit init full-abc &&\n+\tcd full-abc &&\n+\tcommit a &&\n+\tcommit b &&\n+\tcommit c\n+\t) &&\n+\tgit clone --no-local --depth=2 .git shallow &&\n+\tgit --git-dir=shallow/.git log --format=%s >actual &&\n+\tcat <<EOF >expect &&\n+4\n+3\n+EOF\n+\ttest_cmp expect actual &&\n+\tgit clone --no-local --depth=2 full-abc/.git shallow2 &&\n+\tgit --git-dir=shallow2/.git log --format=%s >actual &&\n+\tcat <<EOF >expect &&\n+c\n+b\n+EOF\n+\ttest_cmp expect actual\n+'\n+\n+test_expect_success 'push to shallow repo via http' '\n+\tgit clone --bare --no-local shallow \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n+\t(\n+\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n+\tgit config http.receivepack true\n+\t) &&\n+\t(\n+\tcd full &&\n+\tcommit 9 &&\n+\tgit push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master\n+\t) &&\n+\t(\n+\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n+\tgit fsck &&\n+\tgit log --format=%s top/master >actual &&\n+\tcat <<EOF >expect &&\n+9\n+4\n+3\n+EOF\n+\ttest_cmp expect actual\n+\t)\n+'\n+\n+test_expect_success 'push from shallow repo via http' '\n+\tmv \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" shallow-upstream.git &&\n+\tgit clone --bare --no-local full \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n+\t(\n+\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n+\tgit config http.receivepack true\n+\t) &&\n+\tcommit 1s0 &&\n+\tgit push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master &&\n+\t(\n+\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n+\tgit fsck &&\n+\tgit log --format=%s top/master >actual &&\n+\tcat <<EOF >expect &&\n+10\n+1\n+4\n+3\n+2\n+1\n+EOF\n+\ttest_cmp expect actual\n+\t)\n+'\n+\n+stop_httpd\n+test_done\n-- \n1.9.2.172.gbe1f7c7\n"},{"id":"243014","messageId":"xmqq38frb4g9.fsf@gitster.dls.corp.google.com","threadId":"36788","inReplyTo":"20140530013419.GE28683@sigill.intra.peff.net","subject":"Re: [PATCH] t5537: re-drop http tests","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-05-30T16:45:42Z","receivedAt":"2014-05-30T16:45:42Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> And a final side note. If you retry the merge by:\n>\n>   m=1ddb4d7\n>   git checkout $m^1\n>   git merge $m^2\n>\n> you can see the resulting conflict is quite tricky to understand....\n> Viewing it with diff3 conflict-style makes it much more obvious.\n\nYes, that was a clear mismerge on my side; thanks for catching it.\n\n>\n>  t/t5537-fetch-shallow.sh | 28 ----------------------------\n>  1 file changed, 28 deletions(-)\n>\n> diff --git a/t/t5537-fetch-shallow.sh b/t/t5537-fetch-shallow.sh\n> index be951a4..a980574 100755\n> --- a/t/t5537-fetch-shallow.sh\n> +++ b/t/t5537-fetch-shallow.sh\n> @@ -173,33 +173,6 @@ EOF\n>  \t)\n>  '\n>  \n> -if test -n \"$NO_CURL\" -o -z \"$GIT_TEST_HTTPD\"; then\n> -\tsay 'skipping remaining tests, git built without http support'\n> -\ttest_done\n> -fi\n> -\n> -LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'5537'}\n> -. \"$TEST_DIRECTORY\"/lib-httpd.sh\n> -start_httpd\n> -\n> -test_expect_success 'clone http repository' '\n> -\tgit clone --bare --no-local shallow \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n> -\tgit clone $HTTPD_URL/smart/repo.git clone &&\n> -\t(\n> -\tcd clone &&\n> -\tgit fsck &&\n> -\tgit log --format=%s origin/master >actual &&\n> -\tcat <<EOF >expect &&\n> -7\n> -6\n> -5\n> -4\n> -3\n> -EOF\n> -\ttest_cmp expect actual\n> -\t)\n> -'\n> -\n>  test_expect_success POSIXPERM,SANITY 'shallow fetch from a read-only repo' '\n>  \tcp -R .git read-only.git &&\n>  \tfind read-only.git -print | xargs chmod -w &&\n> @@ -213,5 +186,4 @@ EOF\n>  \ttest_cmp expect actual\n>  '\n>  \n> -stop_httpd\n>  test_done\n"},{"id":"243017","messageId":"20140530172051.GB25443@sigill.intra.peff.net","threadId":"36788","inReplyTo":"87lhtj8sqx.fsf_-_@spindle.srvr.nix","subject":"Re: [RFC PATCH] t5538: move http push tests out to t5542","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-05-30T17:20:52Z","receivedAt":"2014-05-30T17:20:52Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, May 30, 2014 at 11:29:10AM +0100, Nix wrote:\n\n> As 0232852b, but for the push tests instead: this avoids a start_httpd\n> in the middle of the file, which fails under GIT_TEST_HTTPD=false.\n> \n> Signed-off-by: Nick Alcock <nick.alcock@oracle.com>\n\nThanks, this makes sense. I'm really not sure why we didn't notice this\nat the same time as t5537.\n\nI'm cc-ing Duy, who wrote the original test, to give input on the new\ntest setup.\n\n> ---\n> On 30 May 2014, Jeff King said:\n> > diff --git a/t/t5537-fetch-shallow.sh b/t/t5537-fetch-shallow.sh\n> > index be951a4..a980574 100755\n> > --- a/t/t5537-fetch-shallow.sh\n> > +++ b/t/t5537-fetch-shallow.sh\n> \n> btw, t5538-push-shallow.sh has the same bug but was not fixed up that I\n> can see. (Though I can't see the original fix in the history of master\n> either: was it squashed away somehow?)\n\nI don't think so. As far as I can tell, it was never fixed.\n\n> +test_description='push from/to a shallow clone over http'\n> +\n> +. ./test-lib.sh\n> +\n> +if test -n \"$NO_CURL\" -o -z \"$GIT_TEST_HTTPD\"; then\n> +\tsay 'skipping test, git built without http support'\n> +\ttest_done\n> +fi\n\nAh, this may be why we missed it. We should leave the handling of\n$GIT_TEST_HTTPD to lib-httpd.sh. I think the topic to refactor lib-httpd\nsetup and this shallow topic were developed in isolation, and we never\nnoticed the semantic conflict during the merge, because there's no\ntextual conflict.\n\nSo when I tested with a broken apache, we silently skipped this test\n(but setting GIT_TEST_HTTPD=false does not trigger the above skip).\n\n> +test_expect_success 'push from shallow repo via http' '\n> +\tmv \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" shallow-upstream.git &&\n> +\tgit clone --bare --no-local full \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n> +\t(\n> +\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n> +\tgit config http.receivepack true\n> +\t) &&\n> +\tcommit 1s0 &&\n\nThis is a typo, no? The original is just \"commit 10\".\n\nWith that fix, the test still fails:\n\n    --- expect      2014-05-30 17:18:08.638496558 +0000\n    +++ actual      2014-05-30 17:18:08.638496558 +0000\n    @@ -1,5 +1,4 @@\n     10\n    -1\n     4\n     3\n     2\n    not ok 3 - push from shallow repo via http\n\nI think we can just drop that \"1\" from the expected output, though. It\nwas created in the original by the \"push from full to shallow\" test (and\nis rather confusing, anyway, as it shares a name with the original \"1\").\n\n-Peff\n"},{"id":"243018","messageId":"xmqqr43b9o0l.fsf@gitster.dls.corp.google.com","threadId":"36788","inReplyTo":"87lhtj8sqx.fsf_-_@spindle.srvr.nix","subject":"Re: [RFC PATCH] t5538: move http push tests out to t5542","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-05-30T17:26:02Z","receivedAt":"2014-05-30T17:26:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nix <nix@esperi.org.uk> writes:\n\n> As 0232852b, but for the push tests instead: this avoids a start_httpd\n> in the middle of the file, which fails under GIT_TEST_HTTPD=false.\n>\n> Signed-off-by: Nick Alcock <nick.alcock@oracle.com>\n> ---\n> On 30 May 2014, Jeff King said:\n>> diff --git a/t/t5537-fetch-shallow.sh b/t/t5537-fetch-shallow.sh\n>> index be951a4..a980574 100755\n>> --- a/t/t5537-fetch-shallow.sh\n>> +++ b/t/t5537-fetch-shallow.sh\n>\n> btw, t5538-push-shallow.sh has the same bug but was not fixed up that I\n> can see. (Though I can't see the original fix in the history of master\n> either: was it squashed away somehow?)\n\nWhat do you mean by \"the original fix\"?\n\n0232852b (t5537: move http tests out to t5539, 2014-02-13) you cited\nin your proposed log message?  That is v1.9.1~12^2 and certainly is\nreachable from the master branch as master~185^2.\n\n> But something like this is needed.\n\nThanks for marking the patch not to be applied / still broken.  I\nagree that moving http bits into a separate test would be a good way\nto go.\n\n> (signed off with my work email address for paranoia's sake.)\n\nAs long as your employer is fine with your patch contributed to us,\nand assuming that the patch was done on your employer's time, it\nwould be the right thing to do ;-).  Just FYI, if your From: address\non your e-mail does not match that address, you can start your\nmessage body with \"From: Nick Alcock <nick.alcock@oracle.com>\", a\nblank line and then the true body of your message.\n\n>  t/t5538-push-shallow.sh      |  59 -------------------------\n>  t/t5542-push-http-shallow.sh | 101 +++++++++++++++++++++++++++++++++++++++++++\n>  2 files changed, 101 insertions(+), 59 deletions(-)\n>  create mode 100755 t/t5542-push-http-shallow.sh\n>\n> diff --git a/t/t5538-push-shallow.sh b/t/t5538-push-shallow.sh\n> index 8e54ac5..ceee95b 100755\n> --- a/t/t5538-push-shallow.sh\n> +++ b/t/t5538-push-shallow.sh\n> @@ -120,63 +120,4 @@ EOF\n>  \tgit cat-file blob `echo 1|git hash-object --stdin` >/dev/null\n>  \t)\n>  '\n> -\n> -if test -n \"$NO_CURL\" -o -z \"$GIT_TEST_HTTPD\"; then\n> -\tsay 'skipping remaining tests, git built without http support'\n> -\ttest_done\n> -fi\n> -\n> -. \"$TEST_DIRECTORY\"/lib-httpd.sh\n> -start_httpd\n> -\n> -test_expect_success 'push to shallow repo via http' '\n> -\tgit clone --bare --no-local shallow \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n> -\t(\n> -\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n> -\tgit config http.receivepack true\n> -\t) &&\n> -\t(\n> -\tcd full &&\n> -\tcommit 9 &&\n> -\tgit push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master\n> -\t) &&\n> -\t(\n> -\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n> -\tgit fsck &&\n> -\tgit log --format=%s top/master >actual &&\n> -\tcat <<EOF >expect &&\n> -9\n> -4\n> -3\n> -EOF\n> -\ttest_cmp expect actual\n> -\t)\n> -'\n> -\n> -test_expect_success 'push from shallow repo via http' '\n> -\tmv \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" shallow-upstream.git &&\n> -\tgit clone --bare --no-local full \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n> -\t(\n> -\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n> -\tgit config http.receivepack true\n> -\t) &&\n> -\tcommit 10 &&\n> -\tgit push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master &&\n> -\t(\n> -\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n> -\tgit fsck &&\n> -\tgit log --format=%s top/master >actual &&\n> -\tcat <<EOF >expect &&\n> -10\n> -1\n> -4\n> -3\n> -2\n> -1\n> -EOF\n> -\ttest_cmp expect actual\n> -\t)\n> -'\n> -\n> -stop_httpd\n>  test_done\n> diff --git a/t/t5542-push-http-shallow.sh b/t/t5542-push-http-shallow.sh\n> new file mode 100755\n> index 0000000..61a7281\n> --- /dev/null\n> +++ b/t/t5542-push-http-shallow.sh\n> @@ -0,0 +1,101 @@\n> +#!/bin/sh\n> +\n> +test_description='push from/to a shallow clone over http'\n> +\n> +. ./test-lib.sh\n> +\n> +if test -n \"$NO_CURL\" -o -z \"$GIT_TEST_HTTPD\"; then\n> +\tsay 'skipping test, git built without http support'\n> +\ttest_done\n> +fi\n> +\n> +. \"$TEST_DIRECTORY\"/lib-httpd.sh\n> +start_httpd\n> +\n> +commit() {\n> +\techo \"$1\" >tracked &&\n> +\tgit add tracked &&\n> +\tgit commit -m \"$1\"\n> +}\n> +\n> +test_expect_success 'setup' '\n> +\tgit config --global transfer.fsckObjects true &&\n> +\tcommit 1 &&\n> +\tcommit 2 &&\n> +\tcommit 3 &&\n> +\tcommit 4 &&\n> +\tgit clone . full &&\n> +\t(\n> +\tgit init full-abc &&\n> +\tcd full-abc &&\n> +\tcommit a &&\n> +\tcommit b &&\n> +\tcommit c\n> +\t) &&\n> +\tgit clone --no-local --depth=2 .git shallow &&\n> +\tgit --git-dir=shallow/.git log --format=%s >actual &&\n> +\tcat <<EOF >expect &&\n> +4\n> +3\n> +EOF\n> +\ttest_cmp expect actual &&\n> +\tgit clone --no-local --depth=2 full-abc/.git shallow2 &&\n> +\tgit --git-dir=shallow2/.git log --format=%s >actual &&\n> +\tcat <<EOF >expect &&\n> +c\n> +b\n> +EOF\n> +\ttest_cmp expect actual\n> +'\n> +\n> +test_expect_success 'push to shallow repo via http' '\n> +\tgit clone --bare --no-local shallow \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n> +\t(\n> +\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n> +\tgit config http.receivepack true\n> +\t) &&\n> +\t(\n> +\tcd full &&\n> +\tcommit 9 &&\n> +\tgit push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master\n> +\t) &&\n> +\t(\n> +\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n> +\tgit fsck &&\n> +\tgit log --format=%s top/master >actual &&\n> +\tcat <<EOF >expect &&\n> +9\n> +4\n> +3\n> +EOF\n> +\ttest_cmp expect actual\n> +\t)\n> +'\n> +\n> +test_expect_success 'push from shallow repo via http' '\n> +\tmv \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" shallow-upstream.git &&\n> +\tgit clone --bare --no-local full \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n> +\t(\n> +\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n> +\tgit config http.receivepack true\n> +\t) &&\n> +\tcommit 1s0 &&\n> +\tgit push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master &&\n> +\t(\n> +\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n> +\tgit fsck &&\n> +\tgit log --format=%s top/master >actual &&\n> +\tcat <<EOF >expect &&\n> +10\n> +1\n> +4\n> +3\n> +2\n> +1\n> +EOF\n> +\ttest_cmp expect actual\n> +\t)\n> +'\n> +\n> +stop_httpd\n> +test_done\n"},{"id":"243022","messageId":"20140530173621.GD25443@sigill.intra.peff.net","threadId":"36788","inReplyTo":"20140530172051.GB25443@sigill.intra.peff.net","subject":"[PATCH v2] t5538: move http push tests out to t5542","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-05-30T17:36:21Z","receivedAt":"2014-05-30T17:36:21Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"From: Nick Alcock <nick.alcock@oracle.com>\n\nAs 0232852b, but for the push tests instead: this avoids a start_httpd\nin the middle of the file, which fails under GIT_TEST_HTTPD=false.\n\nNote that we have to munge the test in a few ways while\nmoving it:\n\n  1. We drop the `test -z \"$GIT_TEST_HTTPD\"` check; this is\n     too simplistic since 83d842d, and we should let\n     lib-httpd.sh handle it.\n\n  2. We have to port over some of the old setup from t5538.\n\n  3. In the final test, we no longer expect the extra commit\n     \"1\" built on top of \"4\". This was a side effect from an\n     earlier test in t5538 which was not ported over.\n\nSigned-off-by: Nick Alcock <nick.alcock@oracle.com>\nSigned-off-by: Jeff King <peff@peff.net>\n---\nHere it is with the fixups I suggested in the last email. This passes\nfor me, but I'd love to have a sanity check from Duy.\n\n t/t5538-push-shallow.sh      |  59 -------------------------\n t/t5542-push-http-shallow.sh | 100 +++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 100 insertions(+), 59 deletions(-)\n create mode 100755 t/t5542-push-http-shallow.sh\n\ndiff --git a/t/t5538-push-shallow.sh b/t/t5538-push-shallow.sh\nindex 8e54ac5..ceee95b 100755\n--- a/t/t5538-push-shallow.sh\n+++ b/t/t5538-push-shallow.sh\n@@ -120,63 +120,4 @@ EOF\n \tgit cat-file blob `echo 1|git hash-object --stdin` >/dev/null\n \t)\n '\n-\n-if test -n \"$NO_CURL\" -o -z \"$GIT_TEST_HTTPD\"; then\n-\tsay 'skipping remaining tests, git built without http support'\n-\ttest_done\n-fi\n-\n-. \"$TEST_DIRECTORY\"/lib-httpd.sh\n-start_httpd\n-\n-test_expect_success 'push to shallow repo via http' '\n-\tgit clone --bare --no-local shallow \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\t(\n-\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit config http.receivepack true\n-\t) &&\n-\t(\n-\tcd full &&\n-\tcommit 9 &&\n-\tgit push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master\n-\t) &&\n-\t(\n-\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit fsck &&\n-\tgit log --format=%s top/master >actual &&\n-\tcat <<EOF >expect &&\n-9\n-4\n-3\n-EOF\n-\ttest_cmp expect actual\n-\t)\n-'\n-\n-test_expect_success 'push from shallow repo via http' '\n-\tmv \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" shallow-upstream.git &&\n-\tgit clone --bare --no-local full \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\t(\n-\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit config http.receivepack true\n-\t) &&\n-\tcommit 10 &&\n-\tgit push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master &&\n-\t(\n-\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n-\tgit fsck &&\n-\tgit log --format=%s top/master >actual &&\n-\tcat <<EOF >expect &&\n-10\n-1\n-4\n-3\n-2\n-1\n-EOF\n-\ttest_cmp expect actual\n-\t)\n-'\n-\n-stop_httpd\n test_done\ndiff --git a/t/t5542-push-http-shallow.sh b/t/t5542-push-http-shallow.sh\nnew file mode 100755\nindex 0000000..2a691e0\n--- /dev/null\n+++ b/t/t5542-push-http-shallow.sh\n@@ -0,0 +1,100 @@\n+#!/bin/sh\n+\n+test_description='push from/to a shallow clone over http'\n+\n+. ./test-lib.sh\n+\n+if test -n \"$NO_CURL\"; then\n+\tsay 'skipping test, git built without http support'\n+\ttest_done\n+fi\n+\n+. \"$TEST_DIRECTORY\"/lib-httpd.sh\n+start_httpd\n+\n+commit() {\n+\techo \"$1\" >tracked &&\n+\tgit add tracked &&\n+\tgit commit -m \"$1\"\n+}\n+\n+test_expect_success 'setup' '\n+\tgit config --global transfer.fsckObjects true &&\n+\tcommit 1 &&\n+\tcommit 2 &&\n+\tcommit 3 &&\n+\tcommit 4 &&\n+\tgit clone . full &&\n+\t(\n+\tgit init full-abc &&\n+\tcd full-abc &&\n+\tcommit a &&\n+\tcommit b &&\n+\tcommit c\n+\t) &&\n+\tgit clone --no-local --depth=2 .git shallow &&\n+\tgit --git-dir=shallow/.git log --format=%s >actual &&\n+\tcat <<EOF >expect &&\n+4\n+3\n+EOF\n+\ttest_cmp expect actual &&\n+\tgit clone --no-local --depth=2 full-abc/.git shallow2 &&\n+\tgit --git-dir=shallow2/.git log --format=%s >actual &&\n+\tcat <<EOF >expect &&\n+c\n+b\n+EOF\n+\ttest_cmp expect actual\n+'\n+\n+test_expect_success 'push to shallow repo via http' '\n+\tgit clone --bare --no-local shallow \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n+\t(\n+\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n+\tgit config http.receivepack true\n+\t) &&\n+\t(\n+\tcd full &&\n+\tcommit 9 &&\n+\tgit push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master\n+\t) &&\n+\t(\n+\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n+\tgit fsck &&\n+\tgit log --format=%s top/master >actual &&\n+\tcat <<EOF >expect &&\n+9\n+4\n+3\n+EOF\n+\ttest_cmp expect actual\n+\t)\n+'\n+\n+test_expect_success 'push from shallow repo via http' '\n+\tmv \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" shallow-upstream.git &&\n+\tgit clone --bare --no-local full \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n+\t(\n+\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n+\tgit config http.receivepack true\n+\t) &&\n+\tcommit 10 &&\n+\tgit push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master &&\n+\t(\n+\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n+\tgit fsck &&\n+\tgit log --format=%s top/master >actual &&\n+\tcat <<EOF >expect &&\n+10\n+4\n+3\n+2\n+1\n+EOF\n+\ttest_cmp expect actual\n+\t)\n+'\n+\n+stop_httpd\n+test_done\n-- \n2.0.0.rc1.436.g03cb729\n"},{"id":"243032","messageId":"87a99z86g0.fsf@spindle.srvr.nix","threadId":"36788","inReplyTo":"20140530172051.GB25443@sigill.intra.peff.net","subject":"Re: [RFC PATCH] t5538: move http push tests out to t5542","fromName":"Nix","fromEmail":"nix@esperi.org.uk","sentAt":"2014-05-30T18:30:55Z","receivedAt":"2014-05-30T18:30:55Z","isPatch":true,"sender":{"key":"nix@esperi.org.uk","avatar":"https://avatars.githubusercontent.com/u/6503005?v=4"},"body":"On 30 May 2014, Jeff King said:\n\n> On Fri, May 30, 2014 at 11:29:10AM +0100, Nix wrote:\n>\n>> +test_expect_success 'push from shallow repo via http' '\n>> +\tmv \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" shallow-upstream.git &&\n>> +\tgit clone --bare --no-local full \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n>> +\t(\n>> +\tcd \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\" &&\n>> +\tgit config http.receivepack true\n>> +\t) &&\n>> +\tcommit 1s0 &&\n>\n> This is a typo, no? The original is just \"commit 10\".\n\nI have no *idea* where that came from. vi-wreckage I suspect.\n\n> I think we can just drop that \"1\" from the expected output, though. It\n> was created in the original by the \"push from full to shallow\" test (and\n> is rather confusing, anyway, as it shares a name with the original \"1\").\n\nRight.\n\n-- \nNULL && (void)\n"},{"id":"243033","messageId":"8761kn86ci.fsf@spindle.srvr.nix","threadId":"36788","inReplyTo":"xmqqr43b9o0l.fsf@gitster.dls.corp.google.com","subject":"Re: [RFC PATCH] t5538: move http push tests out to t5542","fromName":"Nix","fromEmail":"nix@esperi.org.uk","sentAt":"2014-05-30T18:33:01Z","receivedAt":"2014-05-30T18:33:01Z","isPatch":true,"sender":{"key":"nix@esperi.org.uk","avatar":"https://avatars.githubusercontent.com/u/6503005?v=4"},"body":"On 30 May 2014, Junio C. Hamano said:\n\n> Nix <nix@esperi.org.uk> writes:\n>\n>> (signed off with my work email address for paranoia's sake.)\n>\n> As long as your employer is fine with your patch contributed to us,\n\nMy employer encourages it.\n\n> and assuming that the patch was done on your employer's time, it\n\nThat is hard to define, but I use this copy of git for work purposes as\nwell as non-work purposes, so I arbitrarily define it as done on their\ntime.\n\n> would be the right thing to do ;-).  Just FYI, if your From: address\n> on your e-mail does not match that address, you can start your\n> message body with \"From: Nick Alcock <nick.alcock@oracle.com>\", a\n> blank line and then the true body of your message.\n\nYeah, I oscillated on that and picked the wrong option in the end. :)\n"},{"id":"243067","messageId":"CACsJy8B22uypM3-Zt-1NP0ZxfZ242fBnHR0rHmt-xg7yG30+Aw@mail.gmail.com","threadId":"36788","inReplyTo":"20140530173621.GD25443@sigill.intra.peff.net","subject":"Re: [PATCH v2] t5538: move http push tests out to t5542","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2014-05-31T01:03:32Z","receivedAt":"2014-05-31T01:03:32Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Sat, May 31, 2014 at 12:36 AM, Jeff King <peff@peff.net> wrote:\n> From: Nick Alcock <nick.alcock@oracle.com>\n>\n> As 0232852b, but for the push tests instead: this avoids a start_httpd\n> in the middle of the file, which fails under GIT_TEST_HTTPD=false.\n>\n> Note that we have to munge the test in a few ways while\n> moving it:\n>\n>   1. We drop the `test -z \"$GIT_TEST_HTTPD\"` check; this is\n>      too simplistic since 83d842d, and we should let\n>      lib-httpd.sh handle it.\n>\n>   2. We have to port over some of the old setup from t5538.\n>\n>   3. In the final test, we no longer expect the extra commit\n>      \"1\" built on top of \"4\". This was a side effect from an\n>      earlier test in t5538 which was not ported over.\n>\n> Signed-off-by: Nick Alcock <nick.alcock@oracle.com>\n> Signed-off-by: Jeff King <peff@peff.net>\n> ---\n> Here it is with the fixups I suggested in the last email. This passes\n> for me, but I'd love to have a sanity check from Duy.\n\nLooks good.\n-- \nDuy\n"}]}