2

I used the procedure described here to clone a specific directory from a large git repository. Below are the commands I ran:

git clone --depth 1 --filter=blob:none --no-checkout [REPOSITORY]
git checkout master -- examples/

The examples directory has a lot (>1024) files and after downloading some of them, git checkout master -- examples/ process terminated with the following error:

error: cannot create standard output pipe for index-pack: Too many open files

Can you help me diagnose and fix the issue? My Git version is 2.20.1 (Apple Git-117)

ngalstyan
  • 637
  • 6
  • 14
  • There were a couple of bug fixes for problems in this area recently (around Git 2.24 or maybe even later). So, as [VonC suggested](https://stackoverflow.com/a/61606467/1256452), it's a good idea to try upgrading. – torek May 05 '20 at 06:06

1 Answers1

1

Try first to see if the issue persists with Git 2.26.x, considering BLOB_NONE filtering wasimplemented in 2.26

A lot of improvement are coming with 2.27 when it comes to partial cloning

In the meantime, you might have to use a sparse checkout command (2.25) to checkout only part of that huge folder.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250