MCPcopy Create free account
hub / github.com/continuedev/continue / getGitRemoteUrl

Function getGitRemoteUrl

extensions/cli/src/util/git.ts:12–23  ·  view source on GitHub ↗
(remote: string = "origin")

Source from the content-addressed store, hash-verified

10 * @returns The remote URL or null if not found
11 */
12export function getGitRemoteUrl(remote: string = "origin"): string | null {
13 try {
14 const result = execSync(`git remote get-url ${remote}`, {
15 encoding: "utf-8",
16 cwd: process.cwd(),
17 stdio: "pipe",
18 });
19 return result.trim();
20 } catch {
21 return null;
22 }
23}
24
25/**
26 * Get the current git branch name

Callers 3

detectPrUrlFunction · 0.85
getRepoInfoFunction · 0.85
getRepoUrlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected