{"size": 663, "ext": "js", "max_stars_repo_path": "src/commands/deleteTag.js", "max_stars_repo_name": "hakon-j-d-johnsen/isomorphic-git", "max_stars_repo_stars_event_min_datetime": "2017-12-28T15:42:50.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T21:43:54.000Z", "max_issues_repo_path": "src/commands/deleteTag.js", "max_issues_repo_name": "hakon-j-d-johnsen/isomorphic-git", "max_issues_repo_issues_event_min_datetime": "2017-12-28T14:53:31.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T19:25:40.000Z", "max_forks_repo_path": "src/commands/deleteTag.js", "max_forks_repo_name": "hakon-j-d-johnsen/isomorphic-git", "max_forks_repo_forks_event_min_datetime": "2018-01-28T19:47:35.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-29T13:10:27.000Z"}
{"max_stars_count": 5982, "max_issues_count": 1417, "max_forks_count": 338, "avg_line_length": 28.8260869565, "max_line_length": 89, "alphanum_fraction": 0.6546003017}
// @ts-check
import { GitRefManager } from '../managers/GitRefManager.js'

/**
 * Delete a local tag ref
 *
 * @param {Object} args
 * @param {import('../models/FileSystem.js').FileSystem} args.fs
 * @param {string} args.gitdir
 * @param {string} args.ref - The tag to delete
 *
 * @returns {Promise<void>} Resolves successfully when filesystem operations are complete
 *
 * @example
 * await git.deleteTag({ dir: '$input((/))', ref: '$input((test-tag))' })
 * console.log('done')
 *
 */
export async function _deleteTag({ fs, gitdir, ref }) {
  ref = ref.startsWith('refs/tags/') ? ref : `refs/tags/${ref}`
  await GitRefManager.deleteRef({ fs, gitdir, ref })
}
