Skip to content

feat(bundler): support gitignore-style negation in .juliabundleignore#161

Merged
pfitzseb merged 1 commit into
mainfrom
feature/juliabundleignore-negation
Jul 14, 2026
Merged

feat(bundler): support gitignore-style negation in .juliabundleignore#161
pfitzseb merged 1 commit into
mainfrom
feature/juliabundleignore-negation

Conversation

@pfitzseb

Copy link
Copy Markdown
Member

.juliabundleignore now supports .gitignore-style negation. Patterns are evaluated in file order and the last matching pattern wins: a plain pattern excludes a path, and a !-prefixed pattern re-includes a path an earlier pattern excluded. Comment (#) and blank lines are now skipped, and \! / \# escape a literal leading ! / #.

This lets users ignore everything and then add back only what they need, e.g.:

*
!programs/
!programs/*
!Project.toml
!Manifest.toml

Matching switches from an unordered set with an "excluded if any pattern matches" test to an ordered rule list with last-match-wins semantics. With no ! rules the result is identical to the previous behavior, so existing .juliabundleignore files are unaffected.

Note: because Tar.create prunes excluded directories, re-including a path under a directory requires re-including the parent directory first (the same limitation git has); this is documented.

Fixes #130.

@pfitzseb
pfitzseb enabled auto-merge (squash) July 13, 2026 20:15
@pfitzseb
pfitzseb requested a review from a team July 13, 2026 20:15
pankgeorg
pankgeorg previously approved these changes Jul 14, 2026
…#130)

`.juliabundleignore` now supports `.gitignore`-style negation. Patterns are
evaluated in file order and the last matching pattern wins: a plain pattern
excludes a path, and a `!`-prefixed pattern re-includes a path an earlier
pattern excluded. Comment (`#`) and blank lines are now skipped, and `\!` /
`\#` escape a literal leading `!` / `#`.

This lets users ignore everything and then add back only what they need, e.g.:

    *
    !programs/
    !programs/*
    !Project.toml
    !Manifest.toml

Matching switches from an unordered set with an "excluded if any pattern
matches" test to an ordered rule list with last-match-wins semantics. With no
`!` rules the result is identical to the previous behavior, so existing
`.juliabundleignore` files are unaffected.

Note: because `Tar.create` prunes excluded directories, re-including a path
under a directory requires re-including the parent directory first (the same
limitation git has); this is documented.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@pfitzseb
pfitzseb force-pushed the feature/juliabundleignore-negation branch from 203141c to a73db20 Compare July 14, 2026 08:20
@pfitzseb
pfitzseb requested a review from pankgeorg July 14, 2026 08:24
@pfitzseb
pfitzseb merged commit 42e8422 into main Jul 14, 2026
14 checks passed
@pfitzseb
pfitzseb deleted the feature/juliabundleignore-negation branch July 14, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support negated paths in .juliabundleignore

2 participants