MCPcopy
hub / github.com/desktop/desktop / createBareUpstream

Function createBareUpstream

app/test/unit/git/push-test.ts:17–24  ·  view source on GitHub ↗

* Creates a bare clone of a repository to use as an upstream remote. * Bare repos accept pushes to any branch.

(
  t: import('node:test').TestContext,
  source: Repository
)

Source from the content-addressed store, hash-verified

15 * Bare repos accept pushes to any branch.
16 */
17async function createBareUpstream(
18 t: import('node:test').TestContext,
19 source: Repository
20): Promise<string> {
21 const barePath = await createTempDirectory(t)
22 await exec(['clone', '--bare', source.path, barePath], source.path)
23 return barePath
24}
25
26describe('git/push', () => {
27 it('pushes commits to a local remote', async t => {

Callers 1

push-test.tsFile · 0.85

Calls 2

createTempDirectoryFunction · 0.90
execFunction · 0.85

Tested by

no test coverage detected