-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(prune): add
--use-gitignore
flag (#9797)
### Description Closes #9789 Adds a flag for opting out of respecting `.gitignore`. If you want to copy over files that are ignored by `git` you can now pass `--use-gitignore=false` to `turbo prune`. ### Testing Instructions Added unit tests. Quick manual test: ``` # A gitignored file in the app [0 olszewski@chriss-mbp] /tmp/turborepo-gitignore-bug $ stat apps/web/.turbo 16777234 160702923 drwxr-xr-x 6 olszewski wheel 0 192 "Jan 24 14:05:04 2025" "Jan 24 14:05:04 2025" "Jan 24 14:05:04 2025" "Jan 24 14:05:04 2025" 4096 0 0 .turbo [0 olszewski@chriss-mbp] /tmp/turborepo-gitignore-bug $ turbo_dev --skip-infer prune web --use-gitignore=false turbo 2.3.4 Generating pruned monorepo for web in /private/tmp/turborepo-gitignore-bug/out - Added @repo/eslint-config - Added @repo/typescript-config - Added @repo/ui - Added web [0 olszewski@chriss-mbp] /tmp/turborepo-gitignore-bug $ stat out/apps/web/.turbo/ 16777234 160756779 drwxr-xr-x 3 olszewski wheel 0 96 "Jan 24 14:07:47 2025" "Jan 24 14:07:30 2025" "Jan 24 14:07:30 2025" "Jan 24 14:07:30 2025" 4096 0 0 out/apps/web/.turbo/ [0 olszewski@chriss-mbp] /tmp/turborepo-gitignore-bug $ rm -r out [0 olszewski@chriss-mbp] /tmp/turborepo-gitignore-bug $ turbo_dev --skip-infer prune web --use-gitignore turbo 2.3.4 Generating pruned monorepo for web in /private/tmp/turborepo-gitignore-bug/out - Added @repo/eslint-config - Added @repo/typescript-config - Added @repo/ui - Added web [0 olszewski@chriss-mbp] /tmp/turborepo-gitignore-bug $ stat out/apps/web/.turbo/ stat: out/apps/web/.turbo/: stat: No such file or directory ```
- Loading branch information
1 parent
02fc06c
commit 878a22a
Showing
6 changed files
with
114 additions
and
24 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters