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

Re: Users of git-check-files?

From
Linus Torvalds <torvalds@osdl.org>
Date
Aug 3, 2005, 17:23 UTC
Message-ID
<Pine.LNX.4.58.0508031014070.3258@g5.osdl.org>
In-Reply-To
<7voe8fdkd7.fsf@assigned-by-dhcp.cox.net>
On Wed, 3 Aug 2005, Junio C Hamano wrote:
Show 9 quoted lines
>
> Linus Torvalds <torvalds@osdl.org> writes:
> 
> > Are you sure you have a good git version on master? I've never seen 
> > anything like that, and I push all the time..
> 
> I have been esuspecting that it happens only because I rewind
> and rebase "pu", which you never do.  The thing is, even though
> I rewind "pu" all the time, it happens only occasionally.
Oh, that would do it. 

You need to prune back the remote tree you send to, so that it is a real subset of what you are sending from (at least as far as the branch you send is concerned - other branches may be ahead of you, of course). Unlike "git-fetch-pack", the send-pack interface does not do any common commit discovery, so if you have state on the other end that isn't on your local end, that's setting yourself up for problems: you are basically misusing the interfaces.

I started out to make the "-f" flag to send-file work around it, but I never finished that, partly because it really ends up being the same thing as "git-fetch-pack" in reverse, which was against the whole point of git-send-pack. Send-pack is meant to be an "update remote tree" thing, with the assumption that the remote tree is a subset - and exactly that assumption is what makes send-pack much cheaper than fetch-pack.

(Actually, to me it's not the "cheaper" that matters, but exactly the fact that send-pack is so safe - if somebody has changed something at the other end that I don't have in mine, I _want_ errors, because that would be a serious problem).

		Linus
Previous: Junio C HamanoNext: Junio C Hamano
Message 28 of 37 in “Users of git-check-files?”
  1. Johannes SchindelinAug 2, 2005
  2. Linus TorvaldsAug 3, 2005
  3. Junio C HamanoAug 3, 2005
  4. Johannes SchindelinAug 3, 2005
  5. Linus TorvaldsAug 3, 2005
  6. Johannes SchindelinAug 3, 2005
  7. Linus TorvaldsAug 3, 2005
  8. Junio C HamanoAug 3, 2005
  9. Linus TorvaldsAug 3, 2005
  10. Junio C HamanoAug 3, 2005
  11. Linus TorvaldsAug 3, 2005
  12. Johannes SchindelinAug 3, 2005
  13. Josef WeidendorferAug 3, 2005
  14. Junio C HamanoAug 3, 2005
  15. Josef WeidendorferAug 3, 2005
  16. Linus TorvaldsAug 3, 2005
  17. (preview) Renaming push.Junio C Hamano, Aug 3, 2005
  18. Linus TorvaldsAug 3, 2005
  19. Junio C HamanoAug 4, 2005
  20. Linus TorvaldsAug 4, 2005
  21. Junio C HamanoAug 4, 2005
  22. Junio C HamanoAug 4, 2005
  23. Linus TorvaldsAug 4, 2005
  24. Junio C HamanoAug 4, 2005
  25. Teach rev-list since..til notation.Junio C Hamano, Aug 4, 2005
  26. Linus TorvaldsAug 3, 2005
  27. Junio C HamanoAug 3, 2005
  28. Linus TorvaldsAug 3, 2005
  29. Junio C HamanoAug 3, 2005
  30. Josef WeidendorferAug 3, 2005
  31. Linus TorvaldsAug 3, 2005
  32. Linus TorvaldsAug 3, 2005
  33. Junio C HamanoAug 3, 2005
  34. Josef WeidendorferAug 3, 2005
  35. Johannes SchindelinAug 3, 2005
  36. Junio C HamanoAug 4, 2005
  37. Johannes SchindelinAug 4, 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.