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

Re: [PATCH] git-daemon server

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Jun 4, 2005, 00:06 UTC
Message-ID
<Pine.LNX.4.21.0506031927000.30848-100000@iabervon.org>
In-Reply-To
<Pine.LNX.4.58.0506031450190.1876@ppc970.osdl.org>
On Fri, 3 Jun 2005, Linus Torvalds wrote:
Show 14 quoted lines
> 
> 
> On Fri, 3 Jun 2005, Daniel Barkalow wrote:
> > 
> > Is this somehow different from rpush/rpull aside from using an
> > externally-provided socket and having the proper locking for writing refs
> > (which I posted a while ago, but which hasn't been included anywhere yet)?
> 
> Deathmatch! 
> 
> Anyway, I have to admit that at least as far as I'm concerned, the 
> rpull/rpush thing has the same issues as Jason's code - I've not seen the 
> usage documented anywhere, and that's the only real reason I don't use it 
> myself.

See below. I'd foolishly explained http-pull and rpull, but neglected to mention that rpush is actually useful in its own right. It is used in essentially the same way, but on the other computer. (And I need to fix the Documentation/ file, since other people seem to have missed it, too)

> Also, just out of interest, do either or both of these things pipeline the
> transfer?

Mine doesn't currently. The protocol supports a low level of pipelining (you can request all the objects you know you want, and the sending side doesn't care that you're sending requests before the previous ones are satisfied), but I haven't figured out (or found out from Matt, more likely) a good way to negotiate something more clever.

Show 7 quoted lines
> Me, I want to have a fairly simple script that does the equivalent of what
> I do now for pushing:
> 
> 	rsync -av --delete --exclude-from=.exclude .git/ master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
> 
> except I'd want it to do the locking and the "only accept trivial pushes" 
> stuff (ie no merging, just a pure update).
With patches I have (but have to rebase and such), you could do:
git-rpush -a -w heads/master heads/master //master.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

This would only send the heads/master file and all of the object files it references. It would be easy to write a "--old heads/linus" which would require that the remote value was the local value of heads/linus (I.e., the public value of your head that you'd been working from).

> Maybe git-rpush does this already, and I just never realized.

It currently does all the objects, but doesn't write the refs file on the remote end. That is:

  git-rpush -a heads/master //master.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

Will cause the public tree to contain all the objects reachable from the local value of heads/master. Then you need to write the new head by hand if you don't have the newer stuff.

	-Daniel
*This .sig left intentionally blank*
Previous: Petr BaudisNext: Junio C Hamano
Message 20 of 32 in “git-daemon server”
  1. git-daemon serverJason McMullan, Jun 3, 2005
  2. Linus TorvaldsJun 3, 2005
  3. McMullan, JasonJun 3, 2005
  4. Linus TorvaldsJun 3, 2005
  5. McMullan, JasonJun 3, 2005
  6. Linus TorvaldsJun 3, 2005
  7. McMullan, JasonJun 3, 2005
  8. Linus TorvaldsJun 3, 2005
  9. McMullan, JasonJun 3, 2005
  10. Linus TorvaldsJun 3, 2005
  11. Daniel SerpellJun 3, 2005
  12. Jason McMullanJun 5, 2005
  13. Junio C HamanoJun 3, 2005
  14. Linus TorvaldsJun 3, 2005
  15. Junio C HamanoJun 3, 2005
  16. Junio C HamanoJun 3, 2005
  17. Daniel BarkalowJun 3, 2005
  18. Linus TorvaldsJun 3, 2005
  19. Petr BaudisJun 3, 2005
  20. Daniel BarkalowJun 4, 2005
  21. Junio C HamanoJun 5, 2005
  22. Daniel BarkalowJun 5, 2005
  23. Junio C HamanoJun 5, 2005
  24. Daniel BarkalowJun 5, 2005
  25. Linus TorvaldsJun 5, 2005
  26. rename git-rpush and git-rpull to git-ssh-push and git-ssh-pullJunio C Hamano, Jun 5, 2005
  27. Daniel BarkalowJun 5, 2005
  28. Linus TorvaldsJun 5, 2005
  29. rename git-rpush and git-rpull to git-ssh-push and git-ssh-pullJunio C Hamano, Jun 5, 2005
  30. Linus TorvaldsJun 5, 2005
  31. Jason McMullanJun 5, 2005
  32. Linus TorvaldsJun 5, 2005

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.