Re: [PATCH] Fix race and deadlock when sending pack
- From
Junio C Hamano <junkio@cox.net>
- Date
- Dec 19, 2005, 05:36 UTC
- Message-ID
- <7vzmmxlkbq.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <43A628F6.1060807@serice.net>
Paul Serice <paul@serice.net> writes:
Show 6 quoted lines
> The best way to reproduce the problem is to locally clone your > repository. When you perform a push, git-send-pack will directly set > up pipes connected to stdin and stdout of git-receive-pack. You > should then set up hook/post-update or hook/update to try to write > lots of text to stdout. (You want to use the local protocol because > ssh is robust enough to mask the worst behavior.)
My immediate reaction was "do not do it then", but you are right. Hooks are run after all the protocol exchanges are done, so they should be free to throw any garbage at the other end.
It appears cpfd() seems to mostly duplicate what is in copy.c; is there any particular reason?