picocode-core 0.9.204 → 0.9.205
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/git.js +5 -2
package/package.json
CHANGED
package/src/git.js
CHANGED
|
@@ -90,8 +90,11 @@ export function createGitService({ onChange = () => {} } = {}) {
|
|
|
90
90
|
}
|
|
91
91
|
// the working tree too, so an edit shows up right away rather than at
|
|
92
92
|
// the next poll. recursive watching rides on FSEvents on macOS; the
|
|
93
|
-
// refresh is debounced so a burst of writes costs one git call
|
|
94
|
-
|
|
93
|
+
// refresh is debounced so a burst of writes costs one git call. linux
|
|
94
|
+
// has no native recursive watch: node walks the tree and spends an
|
|
95
|
+
// inotify watch per directory (node_modules included), which can drain
|
|
96
|
+
// the user's whole fs.inotify.max_user_watches, so linux leans on the poll
|
|
97
|
+
if (process.platform !== 'linux') try {
|
|
95
98
|
treeWatcher = watch(root, { recursive: true }, (_event, file) => {
|
|
96
99
|
if (epoch !== started) return
|
|
97
100
|
const name = String(file ?? '')
|