Don't keep an empty pack uploaded through receive-pack
The receive-pack protocol sometimes gets an empty pack file if
there are commands to process but no data was needed to be sent.
In such cases we shouldn't create an empty 32 byte pack on disk,
but instead should discard it.
Since ReceivePack doesn't read the pack header, we only know
the empty state inside of IndexPack. So we fix it here, to
avoid duplicating the header parsing code into ReceivePack.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>