From 9de370ae14584ca5301440019190da1854f80c26 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Wed, 4 Jun 2025 15:00:41 -0700 Subject: [PATCH] watcher: manually ignore .git changes --- quartz/build.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/quartz/build.ts b/quartz/build.ts index 9e657b6..9fff1b6 100644 --- a/quartz/build.ts +++ b/quartz/build.ts @@ -125,9 +125,10 @@ async function startWatching( ctx, mut, contentMap, - ignored: (path) => { - if (gitIgnoredMatcher(path)) return true - const pathStr = path.toString() + ignored: (fp) => { + const pathStr = toPosixPath(fp.toString()) + if (pathStr.startsWith(".git/")) return true + if (gitIgnoredMatcher(pathStr)) return true for (const pattern of cfg.configuration.ignorePatterns) { if (minimatch(pathStr, pattern)) { return true