code: async function fetch(repositoryUrl, execaOpts) {
    try {
      await execa('git', ['fetch', '--unshallow', '--tags', repositoryUrl], execaOpts);
    } catch (error) {
      await execa('git', ['fetch', '--tags', repositoryUrl], execaOpts);
    }
  }
docs: Unshallow the git repository if necessary and fetch all the tags.
  
  @param {String} repositoryUrl The remote repository URL.
  @param {Object} [execaOpts] Options to pass to `execa`.