MCPcopy
hub / github.com/di-sukharev/opencommit / remoteBranchExists

Function remoteBranchExists

test/e2e/utils.ts:317–338  ·  view source on GitHub ↗
(
  remoteGitDir: string,
  branchName: string
)

Source from the content-addressed store, hash-verified

315};
316
317export const remoteBranchExists = async (
318 remoteGitDir: string,
319 branchName: string
320): Promise<boolean> => {
321 try {
322 await fsExecFile(
323 'git',
324 [
325 '--git-dir',
326 remoteGitDir,
327 'rev-parse',
328 '--verify',
329 '--quiet',
330 `refs/heads/${branchName}`
331 ],
332 { cwd: process.cwd() }
333 );
334 return true;
335 } catch {
336 return false;
337 }
338};
339
340export const assertHeadCommit = async (
341 gitDir: string,

Callers 1

gitPush.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…