Skip to content

Unlinked file search fails when .gitignore contains a literal opening brace #17546

Closed

Description

@doraem-on

JabRef version

5.15 (latest release)

Operating system

macOS

Details on version and operating system

JabRef 6.0-beta.255--2026-10-21--2b9641c macOS 26.5.2, Apple Silicon (arm64) Official development build downloaded from builds.jabref.org/main/

Checked with the latest development build (copy version output from About dialog)

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. Create a folder containing two PDFs: paper.pdf and notes{draft.pdf.
  2. In that folder, create a .gitignore file containing this single line:
    notes{draft.pdf
  3. Open a separate sample BibTeX library in JabRef.
  4. Choose Lookup → Search for unlinked local files.
  5. Select the folder from step 1. Leave File type as “Any file” and Last edited as “All time”.
  6. Click Next.
  7. Close the search dialog and open Help → View event log.

Expected:
The search lists paper.pdf and ignores notes{draft.pdf. An opening brace is a valid literal character in a Git ignore pattern.

Actual:
The “Select files to import” page is blank. The event log contains a PatternSyntaxException originating in GitIgnoreFileFilter.

Control test:
Searching a folder containing the same two PDFs, but with notes-draft.pdf as the .gitignore pattern, successfully lists both files.

Git’s check-ignore command also accepts notes{draft.pdf and correctly identifies the matching file as ignored.

Testing used a temporary BibTeX library just for testing

Appendix

The GUI event log contains:

java.util.regex.PatternSyntaxException: Missing '} near index 14
notes{draft.pdf
              ^
    at java.base/sun.nio.fs.Globs.toRegexPattern(Globs.java:204)
    at java.base/sun.nio.fs.Globs.toUnixRegexPattern(Globs.java:211)
    at java.base/sun.nio.fs.UnixFileSystem.getPathMatcher(UnixFileSystem.java:286)
    at org.jabref/org.jabref.gui.externalfiles.GitIgnoreFileFilter.lambda$new$5(GitIgnoreFileFilter.java:56)

Attached screenshots show the successful control search, the blank results page, and the exception in JabRef’s event log.

Image Image Image

Activity

  1. added
    status: needs-triage
    on Oct 22, 2026
  2. added theissue type on Oct 22, 2026
  3. doraem-on commented on Oct 22, 2026

    @doraem-on
    ContributorAuthor

    would like to work on it after triage

  4. added and removed
    status: needs-triage
    on Oct 22, 2026
  5. Gautam-aman commented on Oct 25, 2026

    @Gautam-aman
    Contributor

    I looked into this and traced the failure to GitIgnoreFileFilter, where Git ignore patterns are passed directly to Java's glob matcher. The difference in how literal braces are interpreted appears to cause the exception.

    I can help with regression tests or a focused fix after triage, if that would be useful.

  6. doraem-on commented on Oct 27, 2026

    @doraem-on
    ContributorAuthor

    /assign-me

  7. jabref-machine commented on Oct 27, 2026

    @jabref-machine
    Collaborator

    ⚠️ Self-Assignment Not Allowed

    Hi @doraem-on, you cannot self-assign an issue you created.

    Note

    This project requires maintainer approval before working on self-created issues to ensure alignment with the project roadmap.

    What you can do
    • Wait for a maintainer to review and approve your issue
    • Ask a maintainer to assign you if the issue is approved
    • Look for other existing issues to contribute to
  8. doraem-on commented on Oct 27, 2026

    @doraem-on
    ContributorAuthor

    @Siedlerchr could you assign it to me , im working on it

  9. jabref-machine commented on Oct 27, 2026

    @jabref-machine
    Collaborator

    👋 Hey @doraem-on, looks like you’re eager to work on this issue — great! 🎉 It also looks like you don't know how to assign issues to yourself. Please read our CONTRIBUTING.md to find out how. It will also guide you in other aspects of contributing to JabRef.

  10. Sandeep332005 commented on Oct 31, 2026

    @Sandeep332005
    Contributor

    /assign-me

  11. 2 remaining items

  12. jabref-machine commented on Oct 31, 2026

    @jabref-machine
    Collaborator

    👋 Hey @Sandeep332005, thank you for your interest in this issue! 🎉

    We're excited to have you on board. Start by exploring our Contributing guidelines, and set up your local development workspace by following the steps in our workspace setup guidelines to get started smoothly.
    When using AI tools, please use them as an assistant rather than simply copying their output. See Don't paste the AI, please..
    For questions on JabRef functionality, you can consult the JabRef Guru. For questions related to the codebase, please start using DeepWiki.

    In case you encounter failing tests during development, please check our developer FAQs!

    Still facing issues or having more questions? Feel free to ask here on GitHub or on JabRef's Gitter chat. Please don't hesitate to open a (draft) pull request early on to show the direction you are heading towards if unsure.

    Happy coding! 🚀

  13. moved this from Free to take to Assigned in Good First Issueson Oct 31, 2026
  14. moved this from Assigned to In Progress in Good First Issueson Nov 1, 2026
  15. doraem-on commented on Nov 2, 2026

    @doraem-on
    ContributorAuthor

    @Sandeep332005 it is not a good practice to snipe the issue without asking the person who raised , would waste both our time......but you can take this since you have already worked on the complete Pr and its a good first issue

  16. doraem-on commented on Nov 2, 2026

    @doraem-on
    ContributorAuthor

    @koppor , @Siedlerchr why the issue author still can’t self-assign after triage , its leads to overlapping of the work , could that requirement and the process be documented more clearly , thanks

  17. koppor commented on Nov 2, 2026

    @koppor
    Member

    @koppor , @Siedlerchr why the issue author still can’t self-assign after triage , its leads to overlapping of the work , could that requirement and the process be documented more clearly , thanks

    Things move fast here. The triage is new.

    You can file a PR to remove the self-assignment check. The check for triage should be enough.

  18. koppor commented on Nov 2, 2026

    @koppor
    Member

    @Sandeep332005 it is not a good practice to snipe the issue without asking the person who raised , would waste both our time......but you can take this since you have already worked on the complete Pr and its a good first issue

    And you can review it, because you are in the context, because you filed the issue.

    This is even better than fixing for oneself, because this is Software Engineering!!

    Please take the time to try out and review.

    See also CONTRIBUTING. We should have information about speeding up things.

  19. Siedlerchr commented on Nov 2, 2026

    @Siedlerchr
    Member

    Normally we do not allow that the issuer creates a PR for its own issue because in the past we had some people creating random issues just for creating a PR without review through maintainers.
    So I would suggest take either another isuse, work together or as @koppor suggested: Review and test! That's how you learn thebest

  20. doraem-on commented on Nov 2, 2026

    @doraem-on
    ContributorAuthor

    Thanks for the advice, @Siedlerchr and @koppor , would work on test and reviewing

  21. moved this from Normal priority to Done in Prioritizationon Nov 14, 2026
  22. moved this from In Progress to Done in Good First Issueson Nov 14, 2026
  23. github-actions commented on Nov 14, 2026

    @github-actions
    Contributor

    We think that this issue was fixed. Please head to https://builds.jabref.org/main to download a development build and try it out.

    For any feedback, add a comment to the pull request at #17656.

  24. added a commit that references this issue on Nov 14, 2026
    47fa9f4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

component: external-files📌 Pinned📍 Assigned

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions