title: Git large directory checkout fails
body: <p>I used the procedure described <a href="https://stackoverflow.com/questions/600079/how-do-i-clone-a-subdirectory-only-of-a-git-repository/52269934#52269934">here</a> to clone a specific directory from a large git repository. Below are the commands I ran: </p>
  
  <pre><code>git clone --depth 1 --filter=blob:none --no-checkout [REPOSITORY]
  git checkout master -- examples/
  </code></pre>
  
  <p>The <code>examples</code> directory has a lot (>1024) files and after downloading some of them, <code>git checkout master -- examples/</code> process terminated with the following error:</p>
  
  <pre><code>error: cannot create standard output pipe for index-pack: Too many open files
  </code></pre>
  
  <p>Can you help me diagnose and fix the issue? 
  My Git version is <code>2.20.1 (Apple Git-117)</code></p>