docs: function git_clone_platform(git_url, branch) {
      // Create a tmp dir. Using /tmp is a problem because it's often on a different partition and sehll.mv()
      // fails in this case with "EXDEV, cross-device link not permitted".
      var tmp_subidr = 'tmp_cordova_git_' + process.pid + '_' + (new Date()).valueOf();
      var tmp_dir = path.join(util.libDirectory, 'tmp', tmp_subidr);
      shell.rm('-rf', tmp_dir);
      shell.mkdir('-p', tmp_dir);
  
      return HooksRunner.fire('before_platform_clone', {
          repository: git_url,
          location: tmp_dir
      }).then(function () {
          var branchToCheckout = branch || 'master';
          return gitclone.clone(git_url, branchToCheckout, tmp_dir);
      }).then(function () {
          HooksRunner.fire('after_platform_clone', {
              repository: git_url,
              location: tmp_dir
          });
          return tmp_dir;
      }).fail(function (err) {
          shell.rm('-rf', tmp_dir);
          return Q.reject(err);
      });
  }