title: nodejs shallow git clone using simple-git
body: <p>I'm trying to create shallow clone using <a href="https://github.com/steveukx/git-js" rel="nofollow noreferrer">simple-git</a>. I'm trying to create an equivalent of this command: <code>git clone --depth 1 https://github.com/steveukx/git-js.git</code>. My code is as follows:</p>
  
  <pre><code>const git = require('simple-git')()
  
  const repoURL = 'https://github.com/steveukx/git-js.git';
  const localPath= './git-js';
  const  options = ['--depth', '1'];
  
  const handlerFn = () =&gt; {
      console.log('DONE')
  };
  
  git.clone(repoURL, localPath, options, handlerFn());
  </code></pre>
  
  <p>I've specified <code>--depth 1</code> in <code>options</code>, but the code copies the entire repo history, it seems to completely ignore the options given. Am I doing this correctly, what can cause this behaviour?</p>