git-bundle: prevent overwriting existing bundles
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>
Fri, 9 Mar 2007 02:50:06 +0000 (03:50 +0100)
committerJunio C Hamano <junkio@cox.net>
Fri, 9 Mar 2007 06:59:07 +0000 (22:59 -0800)
commit2e578f9a4f08ade4e8da52614c566e5dc1c8ca00
tree5449ea3d9d114017252cad5dda44f00552238f3b
parentd58c6184e345b9c8c8bfe8cc3eb1bbfe2f5ee4f9
git-bundle: prevent overwriting existing bundles

Not only does it prevent accidentally losing older bundles, but it
also fixes a subtle bug: when writing into an existing bundle,
git-pack-objects would not truncate the bundle. Therefore,
fetching from the bundle would trigger an error in unpack-objects:
"fatal: pack has junk at the end".

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-bundle.c