MCPcopy Create free account
hub / github.com/libgit2/git2go / TestRemotePush

Function TestRemotePush

push_test.go:7–31  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

5)
6
7func TestRemotePush(t *testing.T) {
8 t.Parallel()
9 repo := createBareTestRepo(t)
10 defer cleanupTestRepo(t, repo)
11
12 localRepo := createTestRepo(t)
13 defer cleanupTestRepo(t, localRepo)
14
15 remote, err := localRepo.Remotes.Create("test_push", repo.Path())
16 checkFatal(t, err)
17 defer remote.Free()
18
19 seedTestRepo(t, localRepo)
20
21 err = remote.Push([]string{"refs/heads/master"}, nil)
22 checkFatal(t, err)
23
24 ref, err := localRepo.References.Lookup("refs/remotes/test_push/master")
25 checkFatal(t, err)
26 defer ref.Free()
27
28 ref, err = repo.References.Lookup("refs/heads/master")
29 checkFatal(t, err)
30 defer ref.Free()
31}

Callers

nothing calls this directly

Calls 10

createBareTestRepoFunction · 0.85
cleanupTestRepoFunction · 0.85
createTestRepoFunction · 0.85
checkFatalFunction · 0.85
seedTestRepoFunction · 0.85
FreeMethod · 0.65
CreateMethod · 0.45
PathMethod · 0.45
PushMethod · 0.45
LookupMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…