Bruno Santanna
5ffaaa606a
fix(detect): normalize Unicode so accented ignore patterns match on macOS
...
An ignore rule naming a directory with an accent silently does nothing on
macOS, and the files it was meant to exclude get scanned anyway.
macOS (APFS/HFS+) returns filenames in NFD — "ç" comes back as "c" + U+0327
COMBINING CEDILLA — while editors write ignore files in NFC, where the same
"ç" is the single codepoint U+00E7. The two render identically and compare
unequal, so `fnmatch` never matches and the pattern is a no-op.
Found in a real repo: a `.graphifyignore` containing `Orçamento/` failed to
exclude that directory, and 9 client contract PDFs were picked up for semantic
extraction — i.e. queued to be sent to an LLM — despite an explicit rule
against it. The failure is silent: there is no warning, and the only symptom
is a file count that does not match what you expect. A user who does not
count would never know. That is what makes this worth fixing rather than
documenting: the rule appears to work.
Both sides are now normalized to NFC before matching, at three boundaries:
the pattern (in `_parse_gitignore_line`, so it covers .graphifyignore,
.gitignore and $GIT_DIR/info/exclude alike) and the two path forms used in
`_is_ignored` (`target.name` and the anchor-relative path).
NFC is already the form Linux and Windows produce, so this is a no-op there
and only repairs the macOS mismatch.
Tests: two regression tests cover both directions (NFC pattern vs NFD path on
disk, and the reverse); both fail before this change and pass after. A third
asserts ASCII patterns are unaffected, so the normalization cannot regress
existing behavior.
Full suite: 3833 passed. The 13 failures in tests/test_terraform.py are
pre-existing on a clean upstream checkout (optional tree_sitter_hcl not
installed) and unrelated to this change.
2026-08-11 15:18:33 +01:00
..
2026-08-09 23:19:08 +01:00
2026-04-04 18:52:44 +01:00
2026-05-02 12:54:08 +05:30
2026-07-15 15:09:17 +01:00
2026-07-25 18:02:33 +01:00
2026-07-21 18:39:05 +01:00
2026-07-05 11:41:18 +01:00
2026-06-23 17:26:49 +01:00
2026-07-11 11:52:12 +01:00
2026-06-16 01:41:15 +01:00
2026-07-30 17:13:48 +01:00
2026-05-13 10:07:50 -07:00
2026-07-26 11:52:20 +01:00
2026-07-16 23:48:07 +01:00
2026-06-03 00:08:03 +01:00
2026-07-27 10:46:47 +01:00
2026-05-22 13:22:51 +01:00
2026-07-20 13:29:54 +01:00
2026-08-06 17:29:18 +01:00
2026-08-11 14:40:01 +01:00
2026-07-08 12:09:40 +01:00
2026-08-11 14:40:01 +01:00
2026-08-06 17:29:18 +01:00
2026-07-14 13:19:16 +01:00
2026-07-01 15:09:42 +01:00
2026-05-17 11:32:38 +01:00
2026-07-16 23:48:07 +01:00
2026-07-15 13:13:30 +01:00
2026-08-08 23:37:49 +01:00
2026-07-18 19:07:16 +01:00
2026-07-12 23:57:16 +01:00
2026-08-07 22:49:25 +01:00
2026-05-12 02:23:51 +03:00
2026-07-18 19:07:16 +01:00
2026-07-01 11:52:50 +01:00
2026-08-05 22:08:29 +01:00
2026-04-06 16:06:31 +01:00
2026-07-01 10:49:43 +01:00
2026-06-30 18:30:05 +01:00
2026-06-02 22:23:15 +01:00
2026-07-18 12:04:23 +01:00
2026-07-08 01:16:58 +01:00
2026-08-05 22:08:29 +01:00
2026-08-05 01:41:12 +01:00
2026-06-30 19:32:10 +01:00
2026-06-11 19:52:56 +03:00
2026-08-10 18:06:50 +01:00
2026-08-11 15:18:33 +01:00
2026-05-26 09:17:18 +01:00
2026-07-22 19:31:19 +01:00
2026-07-17 00:09:02 +01:00
2026-07-30 17:13:48 +01:00
2026-08-11 15:18:33 +01:00
2026-07-13 10:29:26 +01:00
2026-08-08 23:37:49 +01:00
2026-07-22 18:40:11 +01:00
2026-08-11 14:40:01 +01:00
2026-06-28 16:57:00 +01:00
2026-07-09 13:22:36 +01:00
2026-06-07 15:03:49 +03:00
2026-07-20 16:35:14 +01:00
2026-06-28 16:57:00 +01:00
2026-06-18 01:55:56 +01:00
2026-07-06 16:43:21 +01:00
2026-07-29 17:02:00 +01:00
2026-07-30 17:13:48 +01:00
2026-08-11 14:40:01 +01:00
2026-07-20 15:35:40 +01:00
2026-05-07 20:07:57 +01:00
2026-07-27 10:46:47 +01:00
2026-07-06 16:49:31 +01:00
2026-07-18 19:07:16 +01:00
2026-07-28 09:37:39 +01:00
2026-08-05 22:08:29 +01:00
2026-08-05 22:08:29 +01:00
2026-06-30 16:58:23 +01:00
2026-08-11 15:18:33 +01:00
2026-07-29 17:25:08 +01:00
2026-05-05 00:07:50 +02:00
2026-07-20 11:29:22 +01:00
2026-07-25 22:53:43 +01:00
2026-07-27 10:46:47 +01:00
2026-07-28 09:37:39 +01:00
2026-06-30 23:26:13 +01:00
2026-07-01 10:30:47 +01:00
2026-08-05 01:41:12 +01:00
2026-06-24 11:43:13 +01:00
2026-06-13 15:13:23 +01:00
2026-06-02 20:48:13 +01:00
2026-07-06 16:43:21 +01:00
2026-07-06 16:38:42 +01:00
2026-07-26 11:10:35 +01:00
2026-07-10 02:11:36 +01:00
2026-08-06 17:29:18 +01:00
2026-08-09 23:19:08 +01:00
2026-08-10 18:07:20 +01:00
2026-08-10 18:07:20 +01:00
2026-07-30 17:13:48 +01:00
2026-07-20 11:41:44 +01:00
2026-07-25 23:16:52 +01:00
2026-08-11 15:18:12 +01:00
2026-08-01 12:21:04 +01:00
2026-06-18 22:50:52 +01:00
2026-08-07 22:49:25 +01:00
2026-06-29 09:40:22 +01:00
2026-07-20 15:40:32 +01:00
2026-07-20 11:29:22 +01:00
2026-07-02 22:29:30 +01:00
2026-07-04 22:12:47 +01:00
2026-06-19 10:25:09 +01:00
2026-05-26 20:16:41 +01:00
2026-07-17 10:54:07 +01:00
2026-08-05 22:08:29 +01:00
2026-06-10 15:50:38 +01:00
2026-05-22 13:22:51 +01:00
2026-05-22 13:22:51 +01:00
2026-08-09 23:19:08 +01:00
2026-07-29 17:25:08 +01:00
2026-08-01 11:36:30 +01:00
2026-08-10 18:06:50 +01:00
2026-08-10 18:06:50 +01:00
2026-08-10 18:06:50 +01:00
2026-07-03 18:34:41 +01:00
2026-05-31 16:41:18 +01:00
2026-07-04 22:12:47 +01:00
2026-06-02 22:50:33 +01:00
2026-07-06 12:44:47 +01:00
2026-06-02 22:50:33 +01:00
2026-06-16 01:41:15 +01:00
2026-08-08 23:37:49 +01:00
2026-07-09 00:32:21 +01:00
2026-07-09 00:32:21 +01:00
2026-07-09 01:06:02 +01:00
2026-08-05 22:08:29 +01:00
2026-08-11 14:40:01 +01:00
2026-07-16 16:36:49 +01:00
2026-07-04 21:22:39 +01:00
2026-07-04 03:12:23 +01:00
2026-07-15 19:51:53 +01:00
2026-04-15 23:08:43 +01:00
2026-06-02 22:16:58 +01:00
2026-07-18 12:03:47 +01:00
2026-07-25 22:53:43 +01:00
2026-08-11 14:40:01 +01:00
2026-07-21 21:45:53 +01:00
2026-08-01 11:36:30 +01:00
2026-07-12 10:36:00 +01:00
2026-07-28 09:37:39 +01:00
2026-07-06 16:38:42 +01:00
2026-06-30 12:57:33 +01:00
2026-07-06 12:36:12 +01:00
2026-07-07 10:57:52 +01:00
2026-08-01 15:36:17 +01:00
2026-07-28 09:37:39 +01:00
2026-05-22 13:22:51 +01:00
2026-07-18 19:07:16 +01:00
2026-07-10 20:24:25 +01:00
2026-07-18 19:09:53 +01:00
2026-07-16 23:36:49 +01:00
2026-07-04 03:12:23 +01:00
2026-07-15 15:14:34 +01:00
2026-04-06 16:06:31 +01:00
2026-07-29 17:02:00 +01:00
2026-08-11 15:18:33 +01:00
2026-07-25 22:53:43 +01:00
2026-06-30 23:15:52 +01:00
2026-08-07 22:49:51 +01:00
2026-07-21 14:22:50 +01:00
2026-07-27 10:46:47 +01:00
2026-08-11 14:40:01 +01:00
2026-07-25 15:44:50 +01:00
2026-07-27 10:22:48 +01:00
2026-08-09 23:19:08 +01:00
2026-06-16 03:06:43 +01:00
2026-06-30 16:59:16 +01:00
2026-06-05 21:46:25 +01:00
2026-04-10 15:55:22 +01:00
2026-08-07 22:49:25 +01:00
2026-07-02 22:38:29 +01:00
2026-07-02 22:38:28 +01:00
2026-07-04 03:12:23 +01:00
2026-05-31 16:47:52 +01:00
2026-07-02 22:38:29 +01:00
2026-08-11 15:18:12 +01:00
2026-08-08 23:37:32 +01:00
2026-07-14 23:32:02 +01:00
2026-07-27 10:46:47 +01:00
2026-07-26 11:52:20 +01:00
2026-06-26 10:20:53 +01:00
2026-08-01 11:36:30 +01:00
2026-08-10 18:06:50 +01:00
2026-06-23 17:26:49 +01:00
2026-06-27 10:19:15 +01:00
2026-08-11 14:40:01 +01:00
2026-07-05 10:33:07 +01:00