{"thread":{"id":"19396","subject":"[PATCH 0/3] http*: refactor fetching code (v2)","startedAt":"2009-05-18T08:30:25Z","lastAt":"2009-05-22T08:34:42Z","messageCount":7,"participants":["Tay Ray Chuan","Mike Hommey","Johannes Schindelin","Tony Finch","Clemens Buchacher"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"114164","messageId":"20090518163025.58842505.rctay89@gmail.com","threadId":"19396","inReplyTo":null,"subject":"[PATCH 0/3] http*: refactor fetching code (v2)","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2009-05-18T08:30:25Z","receivedAt":"2009-05-18T08:30:25Z","isPatch":true,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"This patch series applies on pu.\n\nThe major differences between this series and the 11-patch long one\n(dated May 15, 2009) are:\n\n *check 'preq' pointer before using it (for fetching packs) [1]\n *moved free(url) before 'abort' label to stop -Wuninitialized warning\n  (for fetching loose objects) [2]\n *use unlink_or_warn, after 691f1a2 (\"replace direct calls to unlink\n  (2) with unlink_or_warn\")\n\nJunio: I've rebased the patch series on pu, hopefully this stops the\nattribute warnings for patch 3.\n\nTay Ray Chuan (3):\n  http*: add helper methods for fetching packs\n  http*: add helper methods for fetching objects/info/packs\n  http*: add helper methods for fetching objects (loose)\n\n http-push.c   |  378 ++++++++--------------------------------------------\n http-walker.c |  407 +++++++++++---------------------------------------------\n http.c        |  415 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-\n http.h        |   72 ++++++++++-\n 4 files changed, 616 insertions(+), 656 deletions(-)\n\nFootnotes:\n[1] @@ -595,17 +595,21 @@ static void finish_request(struct transfer_request *request)\n     \t\t\tstart_fetch_packed(request);\n     \n     \t} else if (request->state == RUN_FETCH_PACKED) {\n    +\t\tint fail = 1;\n     \t\tif (request->curl_result != CURLE_OK) {\n     \t\t\tfprintf(stderr, \"Unable to get pack file %s\\n%s\",\n     \t\t\t\trequest->url, curl_errorstr);\n    -\t\t\trepo->can_update_info_refs = 0;\n     \t\t} else {\n     \t\t\tpreq = (struct http_pack_request *)request->userData;\n     \n    -\t\t\tif (finish_http_pack_request(preq))\n    -\t\t\t\trepo->can_update_info_refs = 0;\n    +\t\t\tif (preq) {\n    +\t\t\t\tif (finish_http_pack_request(preq) > 0)\n    +\t\t\t\t\tfail = 0;\n    +\t\t\t\trelease_http_pack_request(preq);\n    +\t\t\t}\n     \t\t}\n    -\t\trelease_http_pack_request(preq);\n    +\t\tif (fail)\n    +\t\t\trepo->can_update_info_refs = 0;\n     \t\trelease_request(request);\n     \t}\n     }\n    \n[2] @@ -1167,9 +1167,9 @@ struct http_object_request\n    *new_http_object_request(const char *base_url, \n     \treturn freq;\n     \n    +\tfree(url);\n     abort:\n     \tfree(filename);\n    -\tfree(url);\n     \tfree(freq);\n     \treturn NULL;\n     }\n"},{"id":"114321","messageId":"20090520074352.GC21455@glandium.org","threadId":"19396","inReplyTo":"20090518163025.58842505.rctay89@gmail.com","subject":"Re: [PATCH 0/3] http*: refactor fetching code (v2)","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2009-05-20T07:43:52Z","receivedAt":"2009-05-20T07:43:52Z","isPatch":true,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Mon, May 18, 2009 at 04:30:25PM +0800, Tay Ray Chuan wrote:\n> This patch series applies on pu.\n> \n> The major differences between this series and the 11-patch long one\n> (dated May 15, 2009) are:\n> \n>  *check 'preq' pointer before using it (for fetching packs) [1]\n>  *moved free(url) before 'abort' label to stop -Wuninitialized warning\n>   (for fetching loose objects) [2]\n>  *use unlink_or_warn, after 691f1a2 (\"replace direct calls to unlink\n>   (2) with unlink_or_warn\")\n> \n> Junio: I've rebased the patch series on pu, hopefully this stops the\n> attribute warnings for patch 3.\n> \n> Tay Ray Chuan (3):\n>   http*: add helper methods for fetching packs\n>   http*: add helper methods for fetching objects/info/packs\n>   http*: add helper methods for fetching objects (loose)\n\nI do think these would be even better if they were integrated with\nhttp://kerneltrap.org/mailarchive/git/2009/1/18/4757804.\n\nSpeaking of which, do we have a better http test suite now ? If we do, I\ncan try to (finally) finalize my work.\n\nMike\n"},{"id":"114332","messageId":"alpine.DEB.1.00.0905201220270.16461@intel-tinevez-2-302","threadId":"19396","inReplyTo":"20090520074352.GC21455@glandium.org","subject":"Re: [PATCH 0/3] http*: refactor fetching code (v2)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-05-20T10:21:01Z","receivedAt":"2009-05-20T10:21:01Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 20 May 2009, Mike Hommey wrote:\n\n> do we have a better http test suite now ? If we do, I can try to \n> (finally) finalize my work.\n\nOops, sorry, I know I promised to work on that, but I simply lack the \ntime.\n\nSorry,\nDscho\n"},{"id":"114343","messageId":"be6fef0d0905200510w612d6dd0k7948a3194e6f7c15@mail.gmail.com","threadId":"19396","inReplyTo":"20090520074352.GC21455@glandium.org","subject":"Re: [PATCH 0/3] http*: refactor fetching code (v2)","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2009-05-20T12:10:10Z","receivedAt":"2009-05-20T12:10:10Z","isPatch":true,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"Hi,\n\nOn Wed, May 20, 2009 at 3:43 PM, Mike Hommey <mh@glandium.org> wrote:\n> I do think these would be even better if they were integrated with\n> http://kerneltrap.org/mailarchive/git/2009/1/18/4757804.\n\nyes, I agree very much with your proposed http API, with methods for\nfetching to files and strbufs. Please think of my patch series as an\nintermediate step for your patches, by reducing the amount of code\ninvolved in this API-ish refactoring.\n\nI'm presently working on this.\n\n-- \nCheers,\nRay Chuan\n"},{"id":"114342","messageId":"be6fef0d0905200514p55317a80ra765f6027f47c339@mail.gmail.com","threadId":"19396","inReplyTo":"alpine.DEB.1.00.0905201220270.16461@intel-tinevez-2-302","subject":"Re: [PATCH 0/3] http*: refactor fetching code (v2)","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2009-05-20T12:14:59Z","receivedAt":"2009-05-20T12:14:59Z","isPatch":true,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"Hi,\n\nOn Wed, May 20, 2009 at 6:21 PM, Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n> Oops, sorry, I know I promised to work on that, but I simply lack the\n> time.\n\na quick list of tests available for http* (I left out some minor ones):\n\nt5540-http-push:\n *push to remote repository with packed refs\n *push to remote repository with unpacked refs\n *http-push fetches unpacked objects\n *http-push fetches packed objects\n *create and delete remote branch\n\nt5550-http-fetch:\n *fetch changes via http\n *http remote detects correct HEAD\n *fetch packed objects\n\nMike and Johannes, what else do you have in mind?\n\n-- \nCheers,\nRay Chuan\n"},{"id":"114345","messageId":"alpine.LSU.2.00.0905201500220.23478@hermes-2.csi.cam.ac.uk","threadId":"19396","inReplyTo":"20090520074352.GC21455@glandium.org","subject":"Re: [PATCH 0/3] http*: refactor fetching code (v2)","fromName":"Tony Finch","fromEmail":"dot@dotat.at","sentAt":"2009-05-20T14:03:07Z","receivedAt":"2009-05-20T14:03:07Z","isPatch":true,"sender":{"key":"dot@dotat.at","avatar":"https://avatars.githubusercontent.com/u/68429?v=4"},"body":"On this topic, some of my friends have complained that git doesn't\nautomatically try appending .git to a URL when it fails to find a\nbare git repository on the server.\n\nTony.\n-- \nf.anthony.n.finch  <dot@dotat.at>  http://dotat.at/\nGERMAN BIGHT HUMBER: SOUTHWEST 5 TO 7. MODERATE OR ROUGH. SQUALLY SHOWERS.\nMODERATE OR GOOD.\n"},{"id":"114456","messageId":"20090522083442.GA30571@localhost","threadId":"19396","inReplyTo":"be6fef0d0905200514p55317a80ra765f6027f47c339@mail.gmail.com","subject":"Re: [PATCH 0/3] http*: refactor fetching code (v2)","fromName":"Clemens Buchacher","fromEmail":"drizzd@aon.at","sentAt":"2009-05-22T08:34:42Z","receivedAt":"2009-05-22T08:34:42Z","isPatch":true,"sender":{"key":"drizzd@gmx.net","avatar":"https://avatars.githubusercontent.com/u/59082?v=4"},"body":"On Wed, May 20, 2009 at 08:14:59PM +0800, Tay Ray Chuan wrote:\n> a quick list of tests available for http* (I left out some minor ones):\n[...]\n> \n> Mike and Johannes, what else do you have in mind?\n\nAs I understand it, there is a bunch of error regressions in Mike's patches.\nHaving tests for those would help.\n"}]}