]> arthur.barton.de Git - bup.git/commit
fix unfinished read on tag commits found in vfs cache
authorMuh Muhten <muh.muhten@gmail.com>
Fri, 24 Jun 2022 03:45:41 +0000 (23:45 -0400)
committerRob Browning <rlb@defaultvalue.org>
Sat, 25 Jun 2022 16:36:40 +0000 (11:36 -0500)
commit2fcbc19217eef1dd8492c0a4429cc2b22339ec9a
treeb221a097d1499a6b874b7bdef1277965ea6c5247
parentc6fdb2298c5cbcc6f1d11aec6a6c091efee74be9
fix unfinished read on tag commits found in vfs cache

tag_item was not reading through repo.cat iterator after grabbing the
item type, leaving an in-progress read when listing tags after a
cached access to the commit referred by the tag.  This manifests as an
AssertionError on `bup ls branch .tag` or similar vfs-consuming
command, or the bup fuse fs becoming almost completely unusable after
this access pattern as it errors EINVAL upon any attempt to read new
data from the repo!  Resolve this by checking the cache up-front
before we do any reading.

Signed-off-by: Muh Muhten <muh.muhten@gmail.com>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/vfs.py