]> arthur.barton.de Git - bup.git/commitdiff
Add test for "child named after parent" bug.
authorYung-Chin Oei <oei.yungchin@gmail.com>
Tue, 13 Dec 2011 01:51:27 +0000 (19:51 -0600)
committerRob Browning <rlb@defaultvalue.org>
Fri, 17 Aug 2012 18:42:56 +0000 (13:42 -0500)
The added test shows that saving a node with the same name as the root
of the tree fails.

Changing Node.__cmp__() to compare by full paths should fix the
problem.

Signed-off-by: Yung-Chin Oei <oei.yungchin@gmail.com>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
t/test.sh

index 6058e44c55a260eb01daaaa1ce2d8d3c4d7aec28..7e1039f5881d356a443de97831e2249f1e6a4af7 100755 (executable)
--- a/t/test.sh
+++ b/t/test.sh
@@ -228,6 +228,9 @@ WVSTART "save/git-fsck"
 WVSTART "restore"
 rm -rf buprestore.tmp
 WVFAIL bup restore boink
+touch $TOP/$D/$D
+bup index -u $TOP/$D
+bup save -n master /
 WVPASS bup restore -C buprestore.tmp "/master/latest/$TOP/$D"
 WVPASSEQ "$(ls buprestore.tmp)" "bupdata.tmp"
 rm -rf buprestore.tmp