sublimehq / sublime_merge

Issue tracker for Sublime Merge
https://www.sublimemerge.com
273 stars 14 forks source link

Named character classes not followed in ignore patterns #1942

Open mcclurgm opened 2 months ago

mcclurgm commented 2 months ago

Version info

Description

If I use POSIX named character classes in my .gitignore files, Git will properly ignore them but Sublime Merge will still treat them as if they are not ignored.

Steps to reproduce

Steps to reproduce the behavior:

  1. Create an empty repository and open it in your terminal and Sublime Merge
  2. Create and save a file called "filename.txt" (for example)
  3. Create and save a .gitignore file that contains the content:
    [[:alpha:]]ilename.txt
  4. Run git status on the repo. It will show only .gitignore, meaning that filename.txt was ignored.
  5. Open the repo in Sublime Merge. Both files appear as untracked.
  6. If you try to stage filename.txt, it will produce an error "The following paths are ignored by one of your .gitignore files: filename.txt"

Expected behavior

The file should not appear in Sublime Merge, since it is ignored by Git.

This works fine with other patterns. For example, if I replace the gitignore contents with

[a-z]ilename.txt

Sublime Merge will correctly ignore it. Based on this, it appears to be an issue with the named character classes.

dpjohnst commented 1 month ago

Hi @mcclurgm,

Thanks for reporting this. I've now added support for this, and it will be available in the next Sublime Merge build! I'll update you once this has been released.

Kind regards, - Dylan from Sublime HQ