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

Function createTestRepo

git_test.go:61–74  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

59}
60
61func createTestRepo(t *testing.T) *Repository {
62 // figure out where we can create the test repo
63 path, err := ioutil.TempDir("", "git2go")
64 checkFatal(t, err)
65 repo, err := InitRepository(path, false)
66 checkFatal(t, err)
67
68 tmpfile := "README"
69 err = ioutil.WriteFile(path+"/"+tmpfile, []byte("foo\n"), 0644)
70
71 checkFatal(t, err)
72
73 return repo
74}
75
76func createBareTestRepo(t *testing.T) *Repository {
77 // figure out where we can create the test repo

Callers 15

TestPatchFunction · 0.85
TestBlameFunction · 0.85
TestCreateCommitBufferFunction · 0.85
TestCreateCommitFromIdsFunction · 0.85
TestRepositorySetConfigFunction · 0.85
TestRepositoryItemPathFunction · 0.85
TestRevertFunction · 0.85
TestRevertCommitFunction · 0.85
TestCreateNoteFunction · 0.85
TestNoteIteratorFunction · 0.85
TestRemoveNoteFunction · 0.85
TestDefaultNoteRefFunction · 0.85

Calls 2

checkFatalFunction · 0.85
InitRepositoryFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…