var platform = require('git-node-platform');
var jsGit = require('../.')(platform);
var gitRemote = require('git-net')(platform);
var fsDb = require('git-fs-db')(platform);
var fs = platform.fs;
var basename = require('path').basename;

// Create a remote repo
var url = process.argv[2] || "git://github.com/creationix/conquest.git";
var remote = gitRemote(url);

// Create a local repo
var path = basename(remote.pathname);
var repo = jsGit(fsDb(fs(path)));

console.log("Cloning %s to %s", url, path);

var opts = {
  onProgress: function (progress) {
    process.stdout.write(progress);
  }
};

repo.fetch(remote, opts, function (err) {
  if (err) throw err;
  console.log("Done");
});

@@ -390,16 +390,35 @@
 r path =
+ process.argv%5B3%5D %7C%7C
  basenam
@@ -608,16 +608,91 @@
 ;%0A  %7D%0A%7D;
+%0Aif (process.env.DEPTH) %7B%0A  opts.depth = parseInt(process.env.DEPTH, 10);%0A%7D
 %0A%0Arepo.f

Add more options to clone test