MCPcopy Create free account
hub / github.com/vercel/hyper / setRefRemote

Method setRefRemote

bin/yarn-standalone.js:51819–51835  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51817 }
51818
51819 setRefRemote() {
51820 var _this9 = this;
51821
51822 return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
51823 const isLocal = _this9.gitUrl.protocol === FILE_PROTOCOL;
51824 let stdout;
51825
51826 if (isLocal) {
51827 stdout = yield (0, (_gitSpawn || _load_gitSpawn()).spawn)(['show-ref', '--tags', '--heads'], { cwd: _this9.gitUrl.repository });
51828 } else {
51829 stdout = yield (0, (_gitSpawn || _load_gitSpawn()).spawn)(['ls-remote', '--tags', '--heads', _this9.gitUrl.repository]);
51830 }
51831
51832 const refs = (0, (_gitRefResolver || _load_gitRefResolver()).parseRefs)(stdout);
51833 return _this9.setRef(refs);
51834 })();
51835 }
51836
51837 setRefHosted(hostedRefsList) {
51838 const refs = (0, (_gitRefResolver || _load_gitRefResolver()).parseRefs)(hostedRefsList);

Callers 1

initMethod · 0.80

Calls 4

_load_asyncToGeneratorFunction · 0.85
_load_gitSpawnFunction · 0.85
_load_gitRefResolverFunction · 0.85
setRefMethod · 0.80

Tested by

no test coverage detected