From: Carl Worth <cworth@cworth.org>
To: git@vger.kernel.org
Subject: Should update-server-info be on by default?
Date: Mon, 15 Jan 2007 14:48:03 -0800 [thread overview]
Message-ID: <87vej7x5y4.wl%cworth@cworth.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1728 bytes --]
Somebody recently handed me an http:// URL for a git repository.
I cloned it and it seemed to work, (got the annoying got/walk spew).
Later I tried to pull down recent changes, but I didn't appear to get
anything new.
Confused, I did a new clone, and found that there were new
changes. And looking closer, I got the following when I did a
git-fetch right after the initial clone:
Fetching refs/heads/master from http://www.blaubeermuffin.de/ccc.git using http
* refs/remotes/origin/master: forcing update to non-fast forward
branch 'master' of http://www.blaubeermuffin.de/ccc
old...new: f5abfee...855b7fa
Here the 'old' was the correct, current contents of the remote
refs/heads/master, but the 'new' was actually the initial commit in
the repository, which is obviously the wrong thing in every way.
And it was easy enough to see that git though that that was the
correct remote head value:
git ls-remote --heads http://www.blaubeermuffin.de/ccc.git
855b7fa88a44468754329e795547c968e5d15c7f refs/heads/master
Now, I'd never actually hit this problem before, but I had heard
rumor of it, so I was able to point the maintainer to the default
.git/hooks/post-update script, and things appear to be working with
that enabled.
My question is, why do we require a hook before a git repository will
function correctly over http protocol? Is whatever this hook does so
expensive that we really shouldn't just do it unconditionally and
avoid all the broken-by-default behavior for dumb protocols?
And if keeping this off by default is really the right thing, can we
detect the problem and actually inform the user about it? Such as, not
let an http: clone function at all until things are setup properly?
-Carl
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
reply other threads:[~2007-01-15 22:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vej7x5y4.wl%cworth@cworth.org \
--to=cworth@cworth.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).