Large repository usage problems (too many pack files, timeout issues)
Node v20.11.1
I use your amazing library to make a universal code editor via Electron app. But, i have large repositories (several gigabytes) with several branches to work with, and there are several problems that blocks me from using this library with it:
-
There is no way to specify a timeout in the node http module. I had to take the source code and add a line with a timeout override.
Without it cloning a large repositories failed by timeout... Is there a any way to make it prettier and from library API?
-
When i clone repository as singleBranch: true, i use only fetch, fast-forward and push. But my local copy accumulates a large number of large pack files, although with the same work through the console git client there are 1-2 files of several kilobytes.
So, when i'am adding small json file by several kilobytes in repository then repository grows in size by 300-500 Mb each time... Is this correct behavior?
Please, help
For the first issue, you can contribute and add a feature like this. But I think it would be better to allow using AbortSignal instead of timeout number.
As for 2 I have no idea, you will need to read the code and debug yourself, if you will find a way to fix this then I'm happy to merge your PR. Maybe this is something about Garbage Collection (gc) that is part of canonical git.
@GTVolk the growing is as of time of writing total expected the lib is missing all the optimizations a full git client would have:
- GC Clean up none needed pack files and repack
So yes all the stuff that you see is expected at present and should get better over time when the missing stuff got added to the lib.
Same issue here. It would be great if this timeout could be configurable via an environment variable. In my use case, isomorphic‑git is used indirectly through another library, so I don’t have a direct way to control this setting.