Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

chaining exclusions results in no files being excluded #22

Open
lahwran opened this issue Jul 7, 2021 · 1 comment
Open

chaining exclusions results in no files being excluded #22

lahwran opened this issue Jul 7, 2021 · 1 comment

Comments

@lahwran
Copy link

lahwran commented Jul 7, 2021

eg. given this setup:

# install current release version as of this issue
curl -Ls https://github.com/amoffat/supertag/releases/download/v0.1.4/supertag-x86_64.AppImage > /tmp/tag-0.1.4
chmod +x /tmp/tag-0.1.4
function tag() { /tmp/tag-0.1.4 "$@"; }

# make a debug collection
cd /mnt # change to your base (mine is ~)
sudo mkdir -p supertagdebug
sudo chown $USER:$USER supertagdebug
tag mount supertagdebug
cd supertagdebug

this test case fails:

touch /tmp/{a1,a2,ab,b1,b2,c1}
tag ln /tmp/{a1,a2,ab,b1,b2,c} $PWD/basetag/
tag ln /tmp/{a1,a2,ab} $PWD/basetag/a
tag ln /tmp/{ab,b1,b2} $PWD/basetag/b
tag ln /tmp/c1 $PWD/basetag/c

echo "actual:"
ls basetag/-a/-b/_/
echo "actual vs expected:"
diff <(ls basetag/-a/-b/_/) - << EXPECTED
c1
EXPECTED
echo "actual vs no filtering:"
diff <(ls basetag/-a/-b/_/) <(ls basetag/_/)

I get the output:

actual:
a1
a2
b1
b2
c1
actual vs expected:
1,4d0
< a1
< a2
< b1
< b2
actual vs no filtering:
2a3
> ab

it seems to be excluding the intersection of the intersected tags, rather than individually excluding each separate exclude tag.

@amoffat
Copy link
Owner

amoffat commented Jul 7, 2021

Is basetag a tag within your collection?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants