Re: [PATCH] clone: disconnect transport after fetching
- From
Jeff King <peff@peff.net>
- Date
- Sep 4, 2009, 02:30 UTC
- Message-ID
- <20090904023013.GA14651@coredump.intra.peff.net>
- In-Reply-To
- <20090902063647.GA29559@coredump.intra.peff.net>
On Wed, Sep 02, 2009 at 02:36:47AM -0400, Jeff King wrote:
> This patch just explicitly calls disconnect after we are > done with the remote end, which sends a flush packet to > upload-pack and cleanly disconnects, avoiding the error > message.
I see you applied this with some extra tests. I should have mentioned in the original cover letter that I considered tests but intentionally did not include them.
The problem is that clone forks upload-pack, and then hangs up on it by exiting, and then upload-pack spews the unwanted message. But control has returned to the shell after clone exits, meaning that the message from upload-pack may or may not have gotten there by the time we grep stderr.
So I don't think your test will ever incorrectly show a failure, but I believe that it would pass randomly even without the related fix to the code.
-Peff