Skip to content

Commit 1031096

Browse files
Peter MarreckPeter Marreck
authored andcommitted
fix: index symlinked files even when gitignored
1 parent 9103001 commit 1031096

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/scan.zig

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,12 @@ pub fn findFiles(
107107
const is_file = entry.kind == .file or
108108
(entry.kind == .sym_link and isSymlinkToFile(dir, entry.path));
109109
if (!is_file) continue;
110-
if (git_allow) |*set| {
111-
if (!set.contains(entry.path)) continue;
110+
// Symlinks are always indexed even if gitignored — the user explicitly
111+
// created them, so they want them available for search/navigation.
112+
if (entry.kind != .sym_link) {
113+
if (git_allow) |*set| {
114+
if (!set.contains(entry.path)) continue;
115+
}
112116
}
113117
var extractor = registry.find(entry.path);
114118
if (extractor == null) {

0 commit comments

Comments
 (0)