MCPcopy Create free account
hub / github.com/TGX-Android/Publisher / sshToHttpUrl

Function sshToHttpUrl

main.js:829–840  ·  view source on GitHub ↗
(a)

Source from the content-addressed store, hash-verified

827}
828
829function sshToHttpUrl (a) {
830 if (a.startsWith('ssh://git@')) {
831 return 'https://' + a.substring(10);
832 }
833 if (a.startsWith('git@')) {
834 let index = a.indexOf(':', 4);
835 let domain = a.substring(4, index);
836 let endIndex = a.endsWith('.git') ? a.length - 4 : a.length;
837 return 'https://' + domain + '/' + a.substring(index + 1, endIndex);
838 }
839 return a;
840}
841
842function compareRemoteUrls (a, b) {
843 if (a === b) {

Callers 2

getGitDataFunction · 0.85
compareRemoteUrlsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected