{"thread":{"id":"6391","subject":"Should update-server-info be on by default?","startedAt":"2007-01-15T22:48:03Z","lastAt":"2007-01-15T22:48:03Z","messageCount":1,"participants":["Carl Worth"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"31782","messageId":"87vej7x5y4.wl%cworth@cworth.org","threadId":"6391","inReplyTo":null,"subject":"Should update-server-info be on by default?","fromName":"Carl Worth","fromEmail":"cworth@cworth.org","sentAt":"2007-01-15T22:48:03Z","receivedAt":"2007-01-15T22:48:03Z","isPatch":false,"sender":{"key":"cworth@cworth.org","avatar":"https://gravatar.com/avatar/3746dc28cde609bdbd7f939058356e7e2bbd16d21e32274df0725eb3d998bc5b?d=mp&s=160"},"body":"Somebody recently handed me an http:// URL for a git repository.\nI cloned it and it seemed to work, (got the annoying got/walk spew).\nLater I tried to pull down recent changes, but I didn't appear to get\nanything new.\n\nConfused, I did a new clone, and found that there were new\nchanges. And looking closer, I got the following when I did a\ngit-fetch right after the initial clone:\n\n\tFetching refs/heads/master from\thttp://www.blaubeermuffin.de/ccc.git using http\n\t* refs/remotes/origin/master: forcing update to non-fast forward\n\tbranch 'master' of http://www.blaubeermuffin.de/ccc\n\t  old...new: f5abfee...855b7fa\n\nHere the 'old' was the correct, current contents of the remote\nrefs/heads/master, but the 'new' was actually the initial commit in\nthe repository, which is obviously the wrong thing in every way.\n\nAnd it was easy enough to see that git though that that was the\ncorrect remote head value:\n\n\tgit ls-remote --heads http://www.blaubeermuffin.de/ccc.git\n\t855b7fa88a44468754329e795547c968e5d15c7f        refs/heads/master\n\nNow, I'd never actually hit this problem before, but I had heard\nrumor of it, so I was able to point the maintainer to the default\n.git/hooks/post-update script, and things appear to be working with\nthat enabled.\n\nMy question is, why do we require a hook before a git repository will\nfunction correctly over http protocol? Is whatever this hook does so\nexpensive that we really shouldn't just do it unconditionally and\navoid all the broken-by-default behavior for dumb protocols?\n\nAnd if keeping this off by default is really the right thing, can we\ndetect the problem and actually inform the user about it? Such as, not\nlet an http: clone function at all until things are setup properly?\n\n-Carl\n"}]}