New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The statusMatrix
throw a TypeError when use in the browser with memfs
#1839
Comments
This error comes from line 202 of the I figured out a quick solution: const statusMatrix = await git.statusMatrix({
fs,
dir: '/repo',
filter: (filepath) => filepath !== '.', // Exclude the current directory
});
console.log('statusMatrix', statusMatrix); |
This is most likely an error from |
But also I'm wondering if the '.' is read for those FS modules that do work, which means that it will do extra work for nothing. Do you want to contribute to the code, investigate and maybe fix it (ignore '.' directory if it's read on different fs modules)? |
I was checking the source code and it seems that _walk function always returns '.' as the first entry, it do that only once. I'm not sure if I can change this behavior, it will be a breaking change. Some users may rely on this behavior. |
memfs
.main.ts
:The text was updated successfully, but these errors were encountered: