Re: Users of git-check-files?
From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:03
On Wed, 3 Aug 2005, Junio C Hamano wrote:
Linus Torvalds [off-list ref] writes:quoted
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