Files
huishou/node_modules/nodegit/dist/branch.js
T
2026-07-27 13:37:48 +08:00

20 lines
521 B
JavaScript

"use strict";
var NodeGit = require("../");
var Branch = NodeGit.Branch;
var _remoteName = Branch.remoteName;
/**
* Retrieve the Branch's Remote Name as a String.
*
* @async
* @param {Repository} repo The repo to get the remote name from
* @param {String} the refname of the branch
* @return {String} remote name as a string.
*/
Branch.remoteName = function (repo, remoteRef) {
return _remoteName.call(this, repo, remoteRef).then(function (remoteNameBuffer) {
return remoteNameBuffer.toString();
});
};