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

Re: Git dumb HTTP protocol should work without update-server-info

From
Jeff King <peff@peff.net>
Date
Sep 8, 2025, 00:05 UTC
Message-ID
<20250908000543.GB1281511@coredump.intra.peff.net>
In-Reply-To
<CAGiEHCtP29bQRsEyLabNrLuiP96P-o7EEGi88B7pJbP0tfprxw@mail.gmail.com>
On Sun, Sep 07, 2025 at 01:24:13PM +0200, Milan Hauth wrote:
> expected:
> dumb http remotes should behave like file remotes

File remotes are running a local git-upload-pack to act as the server. A dumb http remote can't run anything on the server side. So we are stuck pretending that the http endpoint is a filesystem. Besides performing terribly, as brian noted it is not even portable to do, since there is no readdir() equivalent (and things like httpdirfs have to resort to scraping auto-generated directory listings).

If you want to go that route, I think you're better off using a fuse wrapper and just letting Git work against the mounted filesystem, as you tried here:

> as another workaround
> i tried to mount the .git/ directory with httpdirfs
> but httpdirfs fails to mount git repos, see
> https://github.com/fangfufu/httpdirfs/issues/183

I think this does work. The instructions you gave there won't do it, though, because python's http.server module doesn't support range requests.

Something like:
  sudo apt install python3-rangehttpserver
  (cd /path/to/repo && python -m RangeHTTPServer)
  mkdir mnt
  sudo httpdirfs http://localhost:8000/.git mnt
got me a mount that worked with:
  # you could probably avoid sudo here with better mount perms above
  sudo git clone mnt foo
It's painfully slow, though.

Possibly dumb-http could learn to do the same scraping that httpdirfs does to get the refs and pack listings (though this might be quite slow for unpacked refs, if the ref tree is deep). But I doubt you will find anybody that enthused about working on or reviewing dumb-http patches these days. The code is not very well maintained, IMO.

-Peff
Previous: Patrick SteinhardtNext: Junio C Hamano
Message 8 of 11 in “Git dumb HTTP protocol should work without update-server-info”
  1. Milan HauthSep 7, 2025
  2. brian m. carlsonSep 7, 2025
  3. Milan HauthSep 7, 2025
  4. brian m. carlsonSep 7, 2025
  5. Patrick SteinhardtSep 8, 2025
  6. Junio C HamanoSep 8, 2025
  7. Patrick SteinhardtSep 9, 2025
  8. Jeff KingSep 8, 2025
  9. Junio C HamanoSep 8, 2025
  10. brian m. carlsonSep 8, 2025
  11. Jeff KingSep 9, 2025

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.