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

Function createTestTrees

diff_test.go:180–193  ·  view source on GitHub ↗
(t *testing.T, repo *Repository)

Source from the content-addressed store, hash-verified

178}
179
180func createTestTrees(t *testing.T, repo *Repository) (originalTree *Tree, newTree *Tree) {
181 var err error
182 _, originalTreeId := seedTestRepo(t, repo)
183 originalTree, err = repo.LookupTree(originalTreeId)
184
185 checkFatal(t, err)
186
187 _, newTreeId := updateReadme(t, repo, "file changed\n")
188
189 newTree, err = repo.LookupTree(newTreeId)
190 checkFatal(t, err)
191
192 return originalTree, newTree
193}
194
195func TestDiffBlobs(t *testing.T) {
196 t.Parallel()

Callers 2

TestFindSimilarFunction · 0.85
TestDiffTreeToTreeFunction · 0.85

Calls 4

seedTestRepoFunction · 0.85
checkFatalFunction · 0.85
updateReadmeFunction · 0.85
LookupTreeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…