]> arthur.barton.de Git - bup.git/commitdiff
vfs: limit root_items branches to refs/heads
authorRob Browning <rlb@defaultvalue.org>
Sat, 31 Mar 2018 19:48:16 +0000 (14:48 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sat, 31 Mar 2018 22:11:33 +0000 (17:11 -0500)
...since the top-level VFS names (without a dot prefix) should only
resolve to branches.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/vfs.py

index d073b7374654c7d3cd9a1031a9703fce4b19b835..f231f4d790ddd48913dd1c2ad8025a33aa28b4db 100644 (file)
@@ -457,7 +457,7 @@ def root_items(repo, names=None, want_meta=True):
     for ref in names:
         if ref in ('.', '.tag'):
             continue
-        it = repo.cat(ref)
+        it = repo.cat('refs/heads/' + ref)
         oidx, typ, size = next(it)
         if not oidx:
             for _ in it: pass