Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: respect gitignore during turbo prune #9711

Merged
merged 9 commits into from
Jan 17, 2025

Conversation

thebrubaker
Copy link
Contributor

@thebrubaker thebrubaker commented Jan 16, 2025

Description

This PR addresses #1292 so that turbo prune now respects .gitignore patterns so that files excluded via .gitignore are properly omitted from the pruned output.

Testing Instructions

You can test the built CLI against this repository confirming that secret.txt is not added to the output with turbo prune: https://github.com/thebrubaker/turbo-prune-test

@thebrubaker thebrubaker requested a review from a team as a code owner January 16, 2025 05:07
@turbo-orchestrator turbo-orchestrator bot added the needs: triage New issues get this label. Remove it after triage label Jan 16, 2025
Copy link

vercel bot commented Jan 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-basic-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 16, 2025 10:04pm
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 16, 2025 10:04pm
examples-gatsby-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 16, 2025 10:04pm
examples-kitchensink-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 16, 2025 10:04pm
examples-native-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 16, 2025 10:04pm
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 16, 2025 10:04pm
examples-svelte-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 16, 2025 10:04pm
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 16, 2025 10:04pm
examples-vite-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 16, 2025 10:04pm

Copy link

vercel bot commented Jan 16, 2025

@thebrubaker is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@chris-olszewski chris-olszewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

Just a few minor changes around error handling, but otherwise it looks good. If you could also merge in thebrubaker#2 so we get some unit test coverage for this behavior it would be appreciated!

crates/turborepo-fs/src/lib.rs Outdated Show resolved Hide resolved
crates/turborepo-fs/src/lib.rs Outdated Show resolved Hide resolved
crates/turborepo-fs/Cargo.toml Outdated Show resolved Hide resolved
crates/turborepo-fs/src/lib.rs Outdated Show resolved Hide resolved
@chris-olszewski chris-olszewski self-assigned this Jan 16, 2025
@chris-olszewski chris-olszewski removed the needs: triage New issues get this label. Remove it after triage label Jan 16, 2025
@turbo-orchestrator turbo-orchestrator bot added the needs: triage New issues get this label. Remove it after triage label Jan 16, 2025
chore(fs): add unit test for .gitignore behavior
thebrubaker and others added 2 commits January 16, 2025 09:04
@chris-olszewski chris-olszewski removed the needs: triage New issues get this label. Remove it after triage label Jan 16, 2025
@turbo-orchestrator turbo-orchestrator bot added the needs: triage New issues get this label. Remove it after triage label Jan 16, 2025
@ijjk
Copy link
Member

ijjk commented Jan 16, 2025

Allow CI Workflow Run

  • approve CI run for commit: d6d375e

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

1 similar comment
@ijjk
Copy link
Member

ijjk commented Jan 16, 2025

Allow CI Workflow Run

  • approve CI run for commit: d6d375e

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@anthonyshew
Copy link
Contributor

anthonyshew commented Jan 16, 2025

I love it when brown bears make contributions.

(More seriously, though. Thank you, @thebrubaker!)

@chris-olszewski chris-olszewski merged commit 8082821 into vercel:main Jan 17, 2025
35 checks passed
@thebrubaker
Copy link
Contributor Author

I love it when brown bears make contributions.

(More seriously, though. Thank you, @thebrubaker!)

happy to help! thanks for the great collaboration flow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: triage New issues get this label. Remove it after triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prune does not respect .gitignore files inside packages
4 participants