FredrikNoren / ungit

The easiest way to use git. On any platform. Anywhere.
MIT License
10.41k stars 637 forks source link

Tries to watch files that have been ignored by gitignore #1544

Open lil5 opened 1 year ago

lil5 commented 1 year ago

This causes my project which includes ignored volumes from a docker container to be searched, which ungit then throws a permission error at.

## Ungit started ##

Took 563ms to start server.
Navigate to http://localhost:8080/#/repository?path=/home/lil5/Projects/my-project/frontend
2022-11-23T16:01:17.657Z - error: Error: EACCES: permission denied, watch '/home/lil5/Projects/my-project/database/data'

I expect the files/dirs that are ignored by git to be ignored by ungit.

wolkenschieber commented 1 year ago

Seeing this with ungit 1.5.22+9c701261:

Full trace:

2023-02-05T10:45:10.903Z - error: Error: EACCES: permission denied, watch '/mnt/Development/docker/docker-scratch/our-shopping-list/dbdata/diagnostic.data'
    at FSWatcher.<computed> (node:internal/fs/watchers:244:19)
    at Object.watch (node:fs:2296:34)
    at /usr/lib/node_modules/ungit/node_modules/node-watch/lib/watch.js:398:22
    at hasNativeRecursive (/usr/lib/node_modules/ungit/node_modules/node-watch/lib/has-native-recursive.js:61:12)
    at Watcher.watchDirectory (/usr/lib/node_modules/ungit/node_modules/node-watch/lib/watch.js:381:3)
    at /usr/lib/node_modules/ungit/node_modules/node-watch/lib/watch.js:414:16
    at /usr/lib/node_modules/ungit/node_modules/node-watch/lib/watch.js:143:35
    at Array.forEach (<anonymous>)
    at /usr/lib/node_modules/ungit/node_modules/node-watch/lib/watch.js:141:13
    at FSReqCallback.oncomplete (node:fs:192:23)