]> arthur.barton.de Git - bup.git/commit
save: always push parents when entering a subtree
authorRob Browning <rlb@defaultvalue.org>
Tue, 4 Nov 2014 18:09:37 +0000 (12:09 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sat, 31 Jan 2015 18:33:48 +0000 (12:33 -0600)
commit0eff3fc44bb3dda4c590b9700ad4ab1148084402
tree3a07061f74c2e083b6da340fb66596fba852fca2
parent584ebfd2b9a13b559d4c552972b27c7bb74ce7e4
save: always push parents when entering a subtree

Once we enter the subtree, all of the parents must be on the stack for
subsequent operations to work correctly (like the _pop() in the
following "if not file:" section).

Consider the case where /some/empty/dir was indexed, but removed before
save.  Without this fix, the metadata read for "dir" would fail and the
pending directory stack (parts) would include /some/empty instead of
/some/empty/dir.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
cmd/save-cmd.py
t/test-rm-between-index-and-save.sh