Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 1.68 KB

File metadata and controls

31 lines (26 loc) · 1.68 KB
title expandRef
sidebar_label expandRef

Expand an abbreviated ref to its full name

param type [= default] description
core string = 'default' The plugin core identifier to use for plugin injection
fs [deprecated] FileSystem The filesystem containing the git repo. Overrides the fs provided by the plugin system.
dir string The working tree directory path
gitdir string = join(dir,'.git') The git directory path
ref string The ref to expand (like "v1.0.0")
return Promise<string> Resolves successfully with a full ref name ("refs/tags/v1.0.0")

Example Code:

let fullRef = await git.expandRef({ dir: '$input((/))', ref: '$input((master))'})
console.log(fullRef)
<script> (function rewriteEditLink() { const el = document.querySelector('a.edit-page-link.button'); if (el) { el.href = 'https://github.com/isomorphic-git/isomorphic-git/edit/master/src/commands/expandRef.js'; } })(); </script>