Re: git doesn't append ".git" to url WAS [PATCH 0/3] http*: refactor fetching code (v2)
- From
Tony Finch <dot@dotat.at>
- Date
- May 21, 2009, 14:29 UTC
- Message-ID
- <alpine.LSU.2.00.0905211518430.23333@hermes-2.csi.cam.ac.uk>
- In-Reply-To
- <be6fef0d0905210717j174499f5k4740dc2f821bec62@mail.gmail.com>
On Thu, 21 May 2009, Tay Ray Chuan wrote:
> > are your friends hosting non-bare repositories directly (with > checked-out copies)? In the first place, this isn't a good idea;
Yes, and yes we all know that this is discouraged.
There are two bugs. Git's error message is misleading: the problem is nothing to do with running git update-server-info (see below). Its behaviour is inconsistent: git retries after appending .git if you are fetching from a local repository or ssh:// or git:// URLs but not for http:// URLs.
$ git clone http://www.greenend.org.uk/rjk/ Initialized empty Git repository in /tmp/rjk/.git/ fatal: http://www.greenend.org.uk/rjk//info/refs not found: did you run git update-server-info on the server?
Actually maybe there's a third bug: it says it has initialized a repository but it removes it again if the clone fails.
Tony.
-- f.anthony.n.finch <dot@dotat.at> http://dotat.at/ GERMAN BIGHT HUMBER: SOUTHWEST 5 TO 7. MODERATE OR ROUGH. SQUALLY SHOWERS. MODERATE OR GOOD.