Skip to content

1.50: include directive's globs break when journal files are underneath a dotted directory #2498

Closed

Description

@psagers

What I initially observed:

Success:

~> /usr/local/bin/hledger --version; /usr/local/bin/hledger check
hledger 1.43.2, linux-x86_64

Fail:

~> /usr/bin/hledger --version; /usr/bin/hledger check
hledger 1.50.3, linux-x86_64
hledger: Error: /home/[redacted]/.local/share/hledger/all.journal:1:1:
  |
1 | include global/*.journal
  | ^
No files were matched by glob pattern: global/*.journal

Old globs:

~> /usr/bin/hledger --version; /usr/bin/hledger check --old-glob
hledger 1.50.3, linux-x86_64

My journals are located under ~/.local, so this appears to be fallout from the exclusion of dotted directories from glob results. Presumably this change was only meant to prevent traversing dotted directories in the glob expansion, not to break any globs that happened to get evaluated entirely underneath a dotted directory.

Activity

  1. changed the title [-]hledger 1.50 no longer resolves glob patterns in journal includes[/-] [+]hledger 1.50 globs break when the journal files are underneath a dotted directory[/+] on Nov 20, 2025
  2. simonmichael commented on Nov 20, 2025

    @simonmichael
    Member

    You're right, this is bigger fallout from the new glob implementation than was expected or documented. Darn! Thanks for the report @psagers. You've earned the https://hledger.org/REGRESSIONS.html#regression-finder-bounty (please claim within 7 days).

  3. added
    A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.
    journalThe journal file format, and its features.
    regressionA backwards step, indicating a weakness in our QA. We don't like these.
    annoyance4-majorMajor usability/doc bug, or any regression or crash.
    affects3-fewAffects just a few users.
    on Nov 20, 2025
  4. simonmichael commented on Nov 20, 2025

    @simonmichael
    Member

    PS to work around, add --old-glob to your ~/.hledger.conf for now.

  5. pinned this issue on Nov 20, 2025
  6. changed the title [-]hledger 1.50 globs break when the journal files are underneath a dotted directory[/-] [+]1.50: include directive's globs break when journal files are underneath a dotted directory[/+] on Nov 20, 2025
  7. psagers commented on Nov 24, 2025

    @psagers
    ContributorAuthor

    Just happy to contribute. Fortunately, it's easy to work around.

  8. simonmichael commented on Dec 4, 2025

    @simonmichael
    Member

    I think the right thing to do here is

    • roll back this 1.50 change:

      "** now automatically ignores anything under dotted directories, like .git/, foo/.secret/, etc. (If you do want it to search dotted directories, you can use the --old-glob flag for now to restore the old behaviour"

    • and release 1.50.4 to stabilise the 1.50 series, with the --old-glob flag ignored

    • and drop the --old-glob flag in 1.51.

    This will restore the old pre-1.50 behaviour (of ** with respect to dot things): 1.50's complete exclusion of dot paths will be dropped, and ** will once again implicitly search non-top-level dot directories.

    This means ** will once again search things like a non-top-level .git directory, but (a) no-one has ever complained about this and (b) if it ever causes a problem that should be easy to work around by making the glob pattern more specific, eg saying **.journal instead of **.

  9. unpinned this issue on Dec 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.affects3-fewAffects just a few users.annoyance4-majorMajor usability/doc bug, or any regression or crash.journalThe journal file format, and its features.regressionA backwards step, indicating a weakness in our QA. We don't like these.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions