Skip to content

Commit 9de370a

Browse files
committed
watcher: manually ignore .git changes
1 parent ae0466e commit 9de370a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

quartz/build.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,10 @@ async function startWatching(
125125
ctx,
126126
mut,
127127
contentMap,
128-
ignored: (path) => {
129-
if (gitIgnoredMatcher(path)) return true
130-
const pathStr = path.toString()
128+
ignored: (fp) => {
129+
const pathStr = toPosixPath(fp.toString())
130+
if (pathStr.startsWith(".git/")) return true
131+
if (gitIgnoredMatcher(pathStr)) return true
131132
for (const pattern of cfg.configuration.ignorePatterns) {
132133
if (minimatch(pathStr, pattern)) {
133134
return true

0 commit comments

Comments
 (0)