Skip to content

[Bug]: Ignore Checks Allow Reincluding a File Even After Parent Folder Is Ignored (Unlike .gitignore Behavior) #1529

Description

@CyanVoxel

Checklist

  • I am using an up-to-date version.
  • I have read the documentation.
  • I have searched existing issues.

TagStudio Version

Alpha v9.6.4 (main)

Operating System & Version

macOS 15

Description

The .ts_ignore system is meant to act 1:1 with .gitignore, however the wcmatch library used to parse the .ts_ignore does not handle reincluding files in the same way - this causes an issue where files are able to be reincluded in ways that don't align with .gitignore, including one that's currently shown as an example in the documentation and acts as the default value when migrating a pre-.ts_ignore library set to EXCLUDE:

# Exclude all files except .jpg files (incorrect behavior for .gitignore)
*
!*.jpg

This does not match .gitignore behavior, where you need to reinclude folders first before reincluding anything else, or else they get skipped when parsing:

# Exclude all files except .jpg files (correct behavior)
*
!*/
!*.jpg

Expected Behavior

.ts_ignore parsing should match 1:1 with .gitignore behavior.
Correcting this issue should not screw with existing libraries, so an informational message may be needed.
Legacy libraries converted from the EXCLUDE list should use the correct pattern going forward.

Steps to Reproduce

Create the "exclude all" example from the description, and observe how it doesn't behave the same as .gitignore.

Logs

N/A

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Priority: HighAn important issue requiring attentionTagStudio: SearchThe TagStudio search engineType: BugSomething isn't working as intendedType: File SystemFile system interactions

Type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions