{"thread":{"id":"13942","subject":"[BUG REPORT] \"git ls-remote http://git.domain.com/repo.git HEAD\" doesn't work","startedAt":"2008-06-14T07:03:36Z","lastAt":"2008-06-14T23:37:12Z","messageCount":13,"participants":["Sven","Mike Hommey","Junio C Hamano","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"79812","messageId":"loom.20080614T065448-251@post.gmane.org","threadId":"13942","inReplyTo":null,"subject":"[BUG REPORT] \"git ls-remote http://git.domain.com/repo.git HEAD\" doesn't work","fromName":"Sven","fromEmail":"svoop@delirium.ch","sentAt":"2008-06-14T07:03:36Z","receivedAt":"2008-06-14T07:03:36Z","isPatch":false,"sender":{"key":"svoop@delirium.ch","avatar":"https://gravatar.com/avatar/8fd0aed1f0e820bea8ecd9679d381055a3fc7fb404f6f0c3a5d4513cd4eb6cf7?d=mp&s=160"},"body":"Hi\n\nFollowing up my recent post, I'm now pretty sure this is a bug. Apparently,\nls-remote does not list the HEAD version when used over HTTP(S) whereas it does\nwork otherwise. Check this out:\n\nover HTTP - no HEAD listed here:\ngit ls-remote http://www.kernel.org/pub/scm/git/git.git\n\nover GIT - HEAD is listed in this case:\ngit ls-remote git://github.com/lux/sitellite.git \n\nAs Capistrano relies on \"git ls-remote http://git.domain.com/repo.git HEAD\" to\nfind out which version to pull, you can't deploy from Git over HTTP(S) repos for\nnow. Capistrano is the de facto standard for deploying Ruby on Rails (and\nrelated) web applications.\n\nThanks a lot for looking into this!! (My knowledge unfortunately doesn't allow\nme to submit a patch myself.)\n\n-sven\n"},{"id":"79814","messageId":"20080614071011.GA29699@glandium.org","threadId":"13942","inReplyTo":"loom.20080614T065448-251@post.gmane.org","subject":"Re: [BUG REPORT] \"git ls-remote http://git.domain.com/repo.git HEAD\" doesn't work","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2008-06-14T07:10:11Z","receivedAt":"2008-06-14T07:10:11Z","isPatch":false,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Sat, Jun 14, 2008 at 07:03:36AM +0000, Sven wrote:\n> Hi\n> \n> Following up my recent post, I'm now pretty sure this is a bug. Apparently,\n> ls-remote does not list the HEAD version when used over HTTP(S) whereas it does\n> work otherwise. Check this out:\n> \n> over HTTP - no HEAD listed here:\n> git ls-remote http://www.kernel.org/pub/scm/git/git.git\n> \n> over GIT - HEAD is listed in this case:\n> git ls-remote git://github.com/lux/sitellite.git \n> \n> As Capistrano relies on \"git ls-remote http://git.domain.com/repo.git HEAD\" to\n> find out which version to pull, you can't deploy from Git over HTTP(S) repos for\n> now. Capistrano is the de facto standard for deploying Ruby on Rails (and\n> related) web applications.\n> \n> Thanks a lot for looking into this!! (My knowledge unfortunately doesn't allow\n> me to submit a patch myself.)\n\n$ GIT_CURL_VERBOSE=1 git ls-remote http://www.kernel.org/pub/scm/git/git.git HEAD\n* Couldn't find host www.kernel.org in the .netrc file, using defaults\n* About to connect() to www.kernel.org port 80 (#0)\n*   Trying 204.152.191.37... * Connected to www.kernel.org (204.152.191.37) port 80 (#0)\n> GET /pub/scm/git/git.git/info/refs HTTP/1.1\nUser-Agent: git/1.5.5.4\nHost: www.kernel.org\nAccept: */*\n\n< HTTP/1.1 200 OK\n< Date: Sat, 14 Jun 2008 07:08:36 GMT\n< Server: Apache/2.2.2 (Fedora)\n< Last-Modified: Sat, 14 Jun 2008 05:04:30 GMT\n< ETag: \"14225449-66de-44f9954509380\"\n< Accept-Ranges: bytes\n< Content-Length: 26334\n< Content-Type: text/plain; charset=UTF-8\n< \n* Expire cleared\n* Connection #0 to host www.kernel.org left intact\n\nhttp://www.kernel.org/pub/scm/git/git.git/info/refs doesn't contain HEAD.\nShouldn't it ?\n\nMike\n"},{"id":"79819","messageId":"7vprqkh423.fsf@gitster.siamese.dyndns.org","threadId":"13942","inReplyTo":"20080614071011.GA29699@glandium.org","subject":"Re: [BUG REPORT] \"git ls-remote http://git.domain.com/repo.git HEAD\" doesn't work","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-06-14T07:24:36Z","receivedAt":"2008-06-14T07:24:36Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Mike Hommey <mh@glandium.org> writes:\n\n> http://www.kernel.org/pub/scm/git/git.git/info/refs doesn't contain HEAD.\n> Shouldn't it ?\n\nTraditionally it _never_ talked about HEAD as it technically is not a ref.\n"},{"id":"79829","messageId":"loom.20080614T074854-525@post.gmane.org","threadId":"13942","inReplyTo":"7vprqkh423.fsf@gitster.siamese.dyndns.org","subject":"Re: [BUG REPORT] \"git ls-remote http://git.domain.com/repo.git HEAD\" doesn't work","fromName":"Sven","fromEmail":"svoop@delirium.ch","sentAt":"2008-06-14T07:49:06Z","receivedAt":"2008-06-14T07:49:06Z","isPatch":false,"sender":{"key":"svoop@delirium.ch","avatar":"https://gravatar.com/avatar/8fd0aed1f0e820bea8ecd9679d381055a3fc7fb404f6f0c3a5d4513cd4eb6cf7?d=mp&s=160"},"body":"Junio C Hamano <gitster <at> pobox.com> writes:\n> Traditionally it _never_ talked about HEAD as it technically is not a ref.\n\nHow likely is it that ls-remote HEAD is added for HTTP as well rather than\nstripped for all protocols?\n\nIn the latter case, there's of course a solution for Capistrano like using\nrefs/heads/master as a default instead and allowing the use of other refs by\nconfiguration. I could do such a patch, however, this only makes sense of\nls-remote HEAD won't be added for HTTP.\n\n-sven\n"},{"id":"79833","messageId":"20080614090244.GA1262@glandium.org","threadId":"13942","inReplyTo":"loom.20080614T074854-525@post.gmane.org","subject":"Re: [BUG REPORT] \"git ls-remote http://git.domain.com/repo.git HEAD\" doesn't work","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2008-06-14T09:02:44Z","receivedAt":"2008-06-14T09:02:44Z","isPatch":false,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Sat, Jun 14, 2008 at 07:49:06AM +0000, Sven wrote:\n> Junio C Hamano <gitster <at> pobox.com> writes:\n> > Traditionally it _never_ talked about HEAD as it technically is not a ref.\n> \n> How likely is it that ls-remote HEAD is added for HTTP as well rather than\n> stripped for all protocols?\n\nWhen someone sends a patch ;)\n\nFWIW, quickly looking at the code, it seems the rsync backend may have\nthe same problem. Now, I wonder if other protocols allow to use other\nrefs such as FETCH_HEAD, or if they special case HEAD. I don't have\nenough time to look this up.\n\nMike\n"},{"id":"79837","messageId":"20080614091900.GA22538@sigill.intra.peff.net","threadId":"13942","inReplyTo":"20080614090244.GA1262@glandium.org","subject":"Re: [BUG REPORT] \"git ls-remote http://git.domain.com/repo.git HEAD\" doesn't work","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-06-14T09:19:00Z","receivedAt":"2008-06-14T09:19:00Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Jun 14, 2008 at 11:02:44AM +0200, Mike Hommey wrote:\n\n> > How likely is it that ls-remote HEAD is added for HTTP as well rather than\n> > stripped for all protocols?\n> \n> When someone sends a patch ;)\n\nI'm not sure I can bring myself to wait for that. After all, it could\ntake nearly negative seven weeks:\n\n  $ git log -1 --pretty=tformat:'%s (%ar)' be885d96\n  Make ls-remote http://... list HEAD, like for git://... (7 weeks ago)\n\n-Peff\n"},{"id":"79838","messageId":"loom.20080614T092039-924@post.gmane.org","threadId":"13942","inReplyTo":"20080614090244.GA1262@glandium.org","subject":"Re: [BUG REPORT] \"git ls-remote http://git.domain.com/repo.git HEAD\" doesn't work","fromName":"Sven","fromEmail":"svoop@delirium.ch","sentAt":"2008-06-14T09:24:57Z","receivedAt":"2008-06-14T09:24:57Z","isPatch":false,"sender":{"key":"svoop@delirium.ch","avatar":"https://gravatar.com/avatar/8fd0aed1f0e820bea8ecd9679d381055a3fc7fb404f6f0c3a5d4513cd4eb6cf7?d=mp&s=160"},"body":"> When someone sends a patch ;)\n\nAs I said, I'm lacking the skills. But I'd take part in sponsoring the patch so\nit's not another 7 weeks wait :-) I know, it's kinda unusual, but it's important\nto me that Capistrano works out of the box with Git over HTTP. So I'd throw in\n$50, anybody willing to join, too. Or to do the patch?\n\n-sven\n"},{"id":"79839","messageId":"20080614092818.GA2401@glandium.org","threadId":"13942","inReplyTo":"20080614091900.GA22538@sigill.intra.peff.net","subject":"Re: [BUG REPORT] \"git ls-remote http://git.domain.com/repo.git HEAD\" doesn't work","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2008-06-14T09:28:18Z","receivedAt":"2008-06-14T09:28:18Z","isPatch":false,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Sat, Jun 14, 2008 at 05:19:00AM -0400, Jeff King wrote:\n> On Sat, Jun 14, 2008 at 11:02:44AM +0200, Mike Hommey wrote:\n> \n> > > How likely is it that ls-remote HEAD is added for HTTP as well rather than\n> > > stripped for all protocols?\n> > \n> > When someone sends a patch ;)\n> \n> I'm not sure I can bring myself to wait for that. After all, it could\n> take nearly negative seven weeks:\n> \n>   $ git log -1 --pretty=tformat:'%s (%ar)' be885d96\n>   Make ls-remote http://... list HEAD, like for git://... (7 weeks ago)\n\nErf, now I must blame myself to have taken a look at a very old\ntransport.c file ;)\n\nMike\n"},{"id":"293729","messageId":"20080614093126.GC22538@sigill.intra.peff.net","threadId":"13942","inReplyTo":"loom.20080614T092039-924@post.gmane.org","subject":"Re: [BUG REPORT] \"git ls-remote http://git.domain.com/repo.git?HEAD\" doesn't work","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-06-14T09:31:26Z","receivedAt":"2008-06-14T09:31:26Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Jun 14, 2008 at 09:24:57AM +0000, Sven wrote:\n\n> As I said, I'm lacking the skills. But I'd take part in sponsoring the\n> patch so it's not another 7 weeks wait :-) I know, it's kinda unusual,\n> but it's important to me that Capistrano works out of the box with Git\n> over HTTP. So I'd throw in $50, anybody willing to join, too. Or to do\n> the patch?\n\nMaybe I wasn't clear in my other message. The wait is either \"none,\nupgrade to the current master\", or \"a week or so, wait for 1.5.6 to be\nreleased.\"\n\nBut I'll take the $50. ;)\n\n"},{"id":"79841","messageId":"loom.20080614T093747-613@post.gmane.org","threadId":"13942","inReplyTo":"20080614093126.GC22538@sigill.intra.peff.net","subject":"Re: [BUG REPORT] \"git ls-remote http://git.domain.com/repo.git?HEAD\" doesn't work","fromName":"Sven","fromEmail":"svoop@delirium.ch","sentAt":"2008-06-14T09:40:38Z","receivedAt":"2008-06-14T09:40:38Z","isPatch":false,"sender":{"key":"svoop@delirium.ch","avatar":"https://gravatar.com/avatar/8fd0aed1f0e820bea8ecd9679d381055a3fc7fb404f6f0c3a5d4513cd4eb6cf7?d=mp&s=160"},"body":"Jeff King <peff <at> peff.net> writes:\n> Maybe I wasn't clear in my other message. The wait is either \"none,\n> upgrade to the current master\", or \"a week or so, wait for 1.5.6 to be\n> released.\"\n\nOh-kay... guess I'll monkey patch Capistrano and wait till 1.5.6 leaks down to\nmy Gentoo box, shouldn't take long. \n\n> But I'll take the $50. ;)\n\nWell, hey, offer made. Tell me where to cable it to. Any in any case - thanks\nfor the patch!\n\n-sven\n"},{"id":"79869","messageId":"7vlk17horn.fsf@gitster.siamese.dyndns.org","threadId":"13942","inReplyTo":"7vprqkh423.fsf@gitster.siamese.dyndns.org","subject":"Re: [BUG REPORT] \"git ls-remote http://git.domain.com/repo.git HEAD\" doesn't work","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-06-14T18:09:32Z","receivedAt":"2008-06-14T18:09:32Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Mike Hommey <mh@glandium.org> writes:\n>\n>> http://www.kernel.org/pub/scm/git/git.git/info/refs doesn't contain HEAD.\n>> Shouldn't it ?\n>\n> Traditionally it _never_ talked about HEAD...\n\nWell, to clarify:\n\n (1) I do not think it is unreasonable to change update-server-info to\n     include HEAD in its output.  That would make ls-remote output over\n     all protocols consistent;\n\n (2) However, the client-side tools that run ls-remote may have to\n     interact with repositories that are managed with older git (including\n     \"Today's git\").  If they rely on the presense of HEAD, they _are_\n     buggy today (and have been so forever), and they _will stay_ buggy\n     when they need to access such repositories.\n\nSo I do not mind (1) for its \"consistency\" value, but that would not be a\n\"fix\" for your problem.\n\nAlso we can do (1) only after somebody audits our own callers to make sure\nthat they do not to get upset by presense of HEAD.  They might have been\nassuming they'd get nothing outside refs/ when talking via http, and\nsuddenly starting to emit HEAD might break them, in which case we cannot\nafford to do (1) --- that would break older clients.\n"},{"id":"79872","messageId":"loom.20080614T181822-325@post.gmane.org","threadId":"13942","inReplyTo":"7vlk17horn.fsf@gitster.siamese.dyndns.org","subject":"Re: [BUG REPORT]","fromName":"Sven","fromEmail":"svoop@delirium.ch","sentAt":"2008-06-14T18:26:00Z","receivedAt":"2008-06-14T18:26:00Z","isPatch":false,"sender":{"key":"svoop@delirium.ch","avatar":"https://gravatar.com/avatar/8fd0aed1f0e820bea8ecd9679d381055a3fc7fb404f6f0c3a5d4513cd4eb6cf7?d=mp&s=160"},"body":">  (1) I do not think it is unreasonable to change update-server-info\n>      to include HEAD in its output.  That would make ls-remote \n>      output over all protocols consistent;\n\nAs Jeff said, he has already done this and it will roll with the \nupcoming release.\n\n>  (2) However, the client-side tools that run ls-remote may have to\n>      interact with repositories that are managed with older git\n>      (including \"Today's git\").  If they rely on the presense of \n>      HEAD, they _are_ buggy today (and have been so forever), and\n>      they _will stay_ buggy when they need to access such \n>      repositories.\n\nIndeed, there is a way to tell Capistrano to use a specific branch: \nAdding ...\n\nset :branch, \"master\"\n\n... to the configuration in deploy.rb does the trick.\n\n-sven\n"},{"id":"79893","messageId":"20080614233712.GA15269@sigill.intra.peff.net","threadId":"13942","inReplyTo":"loom.20080614T181822-325@post.gmane.org","subject":"Re: [BUG REPORT]","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-06-14T23:37:12Z","receivedAt":"2008-06-14T23:37:12Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"[the usual convention on this list is to cc all participants]\n\nOn Sat, Jun 14, 2008 at 06:26:00PM +0000, Sven wrote:\n\n> >  (1) I do not think it is unreasonable to change update-server-info\n> >      to include HEAD in its output.  That would make ls-remote \n> >      output over all protocols consistent;\n> \n> As Jeff said, he has already done this and it will roll with the \n> upcoming release.\n\nTo clarify:\n\n - I didn't do it, Daniel did. I just used git-log to find it (the\n   commit is be885d96).\n\n - That change has nothing to do with update-server-info, but rather\n   happens entirely on the client side. And it appears to just manually\n   add HEAD to the fetch list.\n\n-Peff\n"}]}