isomorphic-git / isomorphic-git/isomorphic-git
Error: EMFILE: too many open files
- Dominant language
- JavaScript
- Stars
- 8.4k
- Forks
- 491
- Avg merge
- 2h 53m
- Merged PRs (30d)
- 7
Description
**error [Error: EMFILE: too many open files, open '<File path>'] {
errno: -4066,
code: 'EMFILE',
syscall: 'open',
path: '<File path>',
caller: 'git.clone'
}**
We have been using nodegit in our electron app as Git source control library. However, we have had a lot of issues lately with inconsistencies and incompatibilities with some basic features like clone with depth and so on. So we have been looking for alternative to manage our huge repository. One of the first issues that I have encountered with iso-git was it could not clone our repository. FYI, our repo is pretty big (13GB (includes git objects) with over 62k files).
I tried using basic clone option with depth=1 so that it would not need to download entire history and got the error above. Here is the code snippet:
```
const git = require('isomorphic-git');
const fs = require('fs');
git.plugins.set('fs', fs);
git
.clone({
dir: 'C:\\local\\repo',
url: 'https://repo-url',
singleBranch: true,
depth: 1,
noGitSuffix: true,
ref: 'master'
});
```
Contributor guide
Assessment
This issue has not been assessed yet.