Fix vitastor-cli ls --tree hiding layers whose parent is filtered out #101

Merged
vitalif merged 1 commits from koolkhel/vitastor:cli-ls-tree into master 2026-10-25 22:24:07 +03:00
Contributor

Description

ls --tree built the tree starting from the roots of the selected layers,
so a layer whose parent was left out by a glob, -p or -n was never
reached and not printed at all: ls --tree testimg printed nothing when
testimg had a parent. Show such a layer as a root; its parent is still
shown in the PARENT column.

Tested: new tests/test_ls_tree.sh (testimg@snap1 with children testimg, testclone and testclone2 in another pool; ls --tree testimg, -n 1, -p testpool2), fails without the fix and passes with it.

Contributor Name

Yury Luneff (MIND Software LLC, https://mindsw.io)

CLA

### Description ls --tree built the tree starting from the roots of the selected layers, so a layer whose parent was left out by a glob, -p or -n was never reached and not printed at all: ls --tree testimg printed nothing when testimg had a parent. Show such a layer as a root; its parent is still shown in the PARENT column. Tested: new tests/test_ls_tree.sh (`testimg@snap1` with children testimg, testclone and testclone2 in another pool; `ls --tree testimg`, `-n 1`, `-p testpool2`), fails without the fix and passes with it. ### Contributor Name Yury Luneff (MIND Software LLC, https://mindsw.io) ### CLA - [x] I accept Vitastor CLA agreement: https://git.yourcmc.ru/vitalif/vitastor/src/branch/master/CLA-en.md
koolkhel added 1 commit 2026-10-25 16:14:58 +03:00
ls --tree built the tree starting from the roots of the selected layers,
so a layer whose parent was left out by a glob, -p or -n was never
reached and not printed at all: ls --tree testimg printed nothing when
testimg had a parent. Show such a layer as a root; its parent is still
shown in the PARENT column.
vitalif merged commit 176d1d16ef into master 2026-10-25 22:24:07 +03:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vitalif/vitastor#101
No description provided.