-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Ensure that ddev does not treat worktrees as extra packages #20444
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
base: master
Are you sure you want to change the base?
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
664d499
to
9db7543
Compare
9db7543
to
ba1d03b
Compare
ba1d03b
to
215a615
Compare
def expected_worktrees(repo: Repository, include_root: bool, only_subpaths: bool) -> list[Path]: | ||
result = [repo.path / "wt"] | ||
|
||
if include_root: | ||
result.append(repo.path) | ||
if not only_subpaths: | ||
result.append(repo.path.parent / "wt2") | ||
|
||
return result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think it could be better to add the expected outcomes as hardcoded values in the pytest.mark.parametrize args, but this works fine too.
What does this PR do?
Updates ddev to ensure that when scaning packages in the repo, any git worktree found is not treated as a possible integration.
Motivation
When working with worktrees it is common to define the worktree as a folder within your repository directory. When ddev scans pacakges within the repo it checks all directory as possible integrations/packages, this includes worktrees folders. This triggers undesired side effect like slow linting and format checks. This is because
ddev test -s
also runs on untracked items and worktrees will likely be untracked.Review checklist (to be filled by reviewers)
qa/skip-qa
label if the PR doesn't need to be tested during QA.backport/<branch-name>
label to the PR and it will automatically open a backport PR once this one is merged