git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Trivial support for cloning and fetching via ftp://.

From
Junio C Hamano <junkio@cox.net>
Date
Sep 14, 2006, 06:57 UTC
Message-ID
<7vk6475408.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060914022404.GA900@sashak.voltaire.com>
Sasha Khapyorsky <sashak@voltaire.com> writes:
> This adds trivial support for cloning and fetching via ftp://.
Interesting.

I was wondering myself if our use of curl libraries in http-fetch allows us to do this when I was looking at the alternates breakage yesterday.

At a few places we do look at http error code that is returned from the curl library, and change our behaviour based on that. But it appears the difference between error code from ftp and http has no bad effect on us. In an empty repository, we can run this:

	$ git-http-fetch -a -v heads/merge \
	  ftp://ftp.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git

(of course, this should normally be with http://www.kernel.org). We notice that we get an error from a request for one object, and switch to pack & alternates transfer. The only difference between http://www and ftp://ftp is that for the former we know error code 404 and supress the error message but for the latter we do not treat error 550 from RETR response any specially and show an error message. We still fall back to retrieve packs, hoping that the missing object is in a pack.

I'd take this patch as is, but we might want to add some error message supression logic just like we do for http.

Previous: Sasha KhapyorskyNext: Sasha Khapyorsky
Message 2 of 11 in “Trivial support for cloning and fetching via ftp://.”
  1. Trivial support for cloning and fetching via ftp://.Sasha Khapyorsky, Sep 14, 2006
  2. Junio C HamanoSep 14, 2006
  3. Sasha KhapyorskySep 16, 2006
  4. Junio C HamanoSep 16, 2006
  5. Sasha KhapyorskySep 16, 2006
  6. Sasha KhapyorskySep 16, 2006
  7. Junio C HamanoSep 16, 2006
  8. Sasha KhapyorskySep 16, 2006
  9. Junio C HamanoSep 16, 2006
  10. Junio C HamanoSep 16, 2006
  11. Sasha KhapyorskySep 16, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.