]> arthur.barton.de Git - bup.git/commit
save-cmd.py: don't write an irrelevant and incomplete .bupm fragment.
authorRob Browning <rlb@defaultvalue.org>
Sun, 25 Aug 2013 22:33:42 +0000 (17:33 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sun, 25 Aug 2013 22:33:45 +0000 (17:33 -0500)
commit46dae41b4bdfeb55aa00c34f92fe9cf514a3b809
tree96b9e03d0c58248ba256a915beab3b18fb387e97
parentaa6f2c87e6f1292f1fa22f618532b65a5565d604
save-cmd.py: don't write an irrelevant and incomplete .bupm fragment.

When finishing up (leaving) a directory and preparing to store its
related tree in the repository, don't write the pending .bupm (which
is still incomplete) to the pack if we know the directory already
exists in the repository (i.e. when we're not going to write it
either).

This problem was discovered when Zoran noticed that two consecutive
saves without an intervening index could produce a repository with an
unreferenced blob (according to git fsck).

Reported-by: Zoran Zaric <zz@zoranzaric.de>
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
cmd/save-cmd.py
t/test-save-creates-no-unrefs.sh [new file with mode: 0755]