Skip to content

Comments

Fix directory_tree returning empty results for paths outside workspace#312

Merged
ericdallo merged 1 commit intomasterfrom
fix-directory-tree-outside-workspace
Feb 18, 2026
Merged

Fix directory_tree returning empty results for paths outside workspace#312
ericdallo merged 1 commit intomasterfrom
fix-directory-tree-outside-workspace

Conversation

@zikajk
Copy link
Member

@zikajk zikajk commented Feb 16, 2026

directory_tree filtered all files when called on paths outside workspace folders. path->root-filename returned nil, causing git-ls-files to run in the wrong directory and the gitignore filter to reject every file.

Skip gitignore filtering when the target path is not within any workspace folder, restoring pre-42712c32 behavior for this case.

  • I added a entry in changelog under unreleased section.
  • This is not an AI slop.

directory_tree filtered all files when called on paths outside workspace
folders. path->root-filename returned nil, causing git-ls-files to run
in the wrong directory and the gitignore filter to reject every file.

Skip gitignore filtering when the target path is not within any
workspace folder, restoring pre-42712c32 behavior for this case.
@zikajk zikajk requested a review from ericdallo February 16, 2026 15:39
@ericdallo ericdallo merged commit 9989a91 into master Feb 18, 2026
9 checks passed
@zikajk zikajk deleted the fix-directory-tree-outside-workspace branch February 18, 2026 16:49
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.

2 participants